diff options
Diffstat (limited to 'contrib/tcpdump/print-igmp.c')
-rw-r--r-- | contrib/tcpdump/print-igmp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/tcpdump/print-igmp.c b/contrib/tcpdump/print-igmp.c index a848562..6522bc3 100644 --- a/contrib/tcpdump/print-igmp.c +++ b/contrib/tcpdump/print-igmp.c @@ -259,6 +259,8 @@ trunc: void igmp_print(register const u_char *bp, register u_int len) { + struct cksum_vec vec[1]; + if (qflag) { (void)printf("igmp"); return; @@ -327,7 +329,9 @@ igmp_print(register const u_char *bp, register u_int len) if (vflag && TTEST2(bp[0], len)) { /* Check the IGMP checksum */ - if (in_cksum((const u_short*)bp, len, 0)) + vec[0].ptr = bp; + vec[0].len = len; + if (in_cksum(vec, 1)) printf(" bad igmp cksum %x!", EXTRACT_16BITS(&bp[2])); } return; |