]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use byte offset instead of rip_dest (a 32-bit field) to extract 314/head
authorXin Li <[email protected]>
Thu, 30 May 2013 21:27:09 +0000 (14:27 -0700)
committerXin Li <[email protected]>
Fri, 31 May 2013 20:53:40 +0000 (13:53 -0700)
16-bit field in order to avoid type punning.  This fixes compile
on IA64 platforms.

print-rip.c

index 327f057a4a62815f432c8d776ec604a0ecdf3197..e941947dd37c61190b979a35b0bdd945e88f9793 100644 (file)
@@ -141,7 +141,7 @@ rip_entry_print_v2(register const struct rip_netinfo *ni, const unsigned remaini
                                putchar (isprint(*p) ? *p : '.');
                } else if (auth_type == 3) {
                        printf("\n\t  Auth header:");
-                       printf(" Packet Len %u,", EXTRACT_16BITS(&ni->rip_dest));
+                       printf(" Packet Len %u,", EXTRACT_16BITS((u_int8_t *)ni + 4));
                        printf(" Key-ID %u,", *((u_int8_t *)ni + 6));
                        printf(" Auth Data Len %u,", *((u_int8_t *)ni + 7));
                        printf(" SeqNo %u,", EXTRACT_32BITS(&ni->rip_dest_mask));