diff options
Diffstat (limited to 'contrib/tcpdump/print-vrrp.c')
-rw-r--r-- | contrib/tcpdump/print-vrrp.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/contrib/tcpdump/print-vrrp.c b/contrib/tcpdump/print-vrrp.c index 899542d..8b733d2 100644 --- a/contrib/tcpdump/print-vrrp.c +++ b/contrib/tcpdump/print-vrrp.c @@ -110,9 +110,15 @@ vrrp_print(register const u_char *bp, register u_int len, int ttl) int i; char c; - if (TTEST2(bp[0], len) && in_cksum((const u_short*)bp, len, 0)) - printf(", (bad vrrp cksum %x)", - EXTRACT_16BITS(&bp[6])); + if (TTEST2(bp[0], len)) { + struct cksum_vec vec[1]; + + vec[0].ptr = bp; + vec[0].len = len; + if (in_cksum(vec, 1)) + printf(", (bad vrrp cksum %x)", + EXTRACT_16BITS(&bp[6])); + } printf(", addrs"); if (naddrs > 1) printf("(%d)", naddrs); |