diff options
| author | Xin LI <delphij@FreeBSD.org> | 2012-05-14 08:01:48 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2012-05-14 08:01:48 +0000 |
| commit | 60894fde29002aac35c5aff244b0f45c4d590413 (patch) | |
| tree | 2d0f73c65ae258539a2146cd435727a18ae62097 /print-mobile.c | |
| parent | 6d59e2f382406def185ce5261b8723a174cd28a3 (diff) | |
Diffstat (limited to 'print-mobile.c')
| -rw-r--r-- | print-mobile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/print-mobile.c b/print-mobile.c index 816ffd6e6585..de4eab1dce3b 100644 --- a/print-mobile.c +++ b/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); } |
