diff options
author | delphij <delphij@FreeBSD.org> | 2012-05-17 05:11:57 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2012-05-17 05:11:57 +0000 |
commit | 661b9d94414ea6d11d5b7960aef1f172975ce52b (patch) | |
tree | 1720d207a135a239a304163c4635810a1094209a /contrib/tcpdump/print-mobile.c | |
parent | 63ab347efe2621fc79f689a92c4bbda531593626 (diff) | |
parent | d36dcecdb3228d24b199eb51cfd7ac666f5b8eb8 (diff) | |
download | FreeBSD-src-661b9d94414ea6d11d5b7960aef1f172975ce52b.zip FreeBSD-src-661b9d94414ea6d11d5b7960aef1f172975ce52b.tar.gz |
Merge tcpdump 4.2.1.
MFC after: 2 weeks
Diffstat (limited to 'contrib/tcpdump/print-mobile.c')
-rw-r--r-- | contrib/tcpdump/print-mobile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/tcpdump/print-mobile.c b/contrib/tcpdump/print-mobile.c index 816ffd6..de4eab1 100644 --- a/contrib/tcpdump/print-mobile.c +++ b/contrib/tcpdump/print-mobile.c @@ -72,6 +72,7 @@ mobile_print(const u_char *bp, u_int length) { const u_char *cp = bp +8 ; const struct mobile_ip *mob; + struct cksum_vec vec[1]; u_short proto,crc; u_char osp =0; /* old source address present */ @@ -101,7 +102,9 @@ mobile_print(const u_char *bp, u_int length) (void)printf("> %s ",ipaddr_string(&mob->odst)); (void)printf("(oproto=%d)",proto>>8); } - if (in_cksum((u_short *)mob, osp ? 12 : 8, 0)!=0) { + vec[0].ptr = (const u_int8_t *)(void *)mob; + vec[0].len = osp ? 12 : 8; + if (in_cksum(vec, 1)!=0) { (void)printf(" (bad checksum %d)",crc); } |