From: Guy Harris Date: Sat, 2 May 2015 20:07:05 +0000 (-0700) Subject: Don't do IPv6 stuff if INET6 isn't defined. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/a890c4489fa1bcee9f455ee28d772bb1ccf590bf Don't do IPv6 stuff if INET6 isn't defined. --- diff --git a/print-pim.c b/print-pim.c index b362911a..788af214 100644 --- a/print-pim.c +++ b/print-pim.c @@ -641,12 +641,14 @@ pimv2_check_checksum(const u_char *bp, const u_char *bp2, u_int len) vec[0].len = len; cksum = in_cksum(vec, 1); return (cksum ? INCORRECT : CORRECT); +#ifdef INET6 } else if (IP_V(ip) == 6) { const struct ip6_hdr *ip6; ip6 = (const struct ip6_hdr *)bp2; cksum = nextproto6_cksum(ip6, bp, len, len, IPPROTO_PIM); return (cksum ? INCORRECT : CORRECT); +#endif } else { return (UNVERIFIED); }