]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-pim.c
use a mnemonic constant in rpl_daoack_print()
[tcpdump] / print-pim.c
index ce4b2afd5228df258266550cf881b6baf8782712..c93f165617fd697ce21280df1210b61694d8be26 100644 (file)
@@ -620,7 +620,7 @@ enum checksum_status {
 };
 
 static enum checksum_status
-pimv2_check_checksum(const u_char *bp, const u_char *bp2, u_int len)
+pimv2_check_checksum(netdissect_options *ndo, const u_char *bp, const u_char *bp2, u_int len)
 {
        const struct ip *ip;
        u_int cksum;
@@ -637,7 +637,7 @@ pimv2_check_checksum(const u_char *bp, const u_char *bp2, u_int len)
                const struct ip6_hdr *ip6;
 
                ip6 = (const struct ip6_hdr *)bp2;
-               cksum = nextproto6_cksum(ip6, bp, len, len, IPPROTO_PIM);
+               cksum = nextproto6_cksum(ndo, ip6, bp, len, len, IPPROTO_PIM);
                return (cksum ? INCORRECT : CORRECT);
        } else {
                return (UNVERIFIED);
@@ -672,7 +672,7 @@ pimv2_print(netdissect_options *ndo,
                         * The checksum only covers the packet header,
                         * not the encapsulated packet.
                         */
-                       cksum_status = pimv2_check_checksum(bp, bp2, 8);
+                       cksum_status = pimv2_check_checksum(ndo, bp, bp2, 8);
                        if (cksum_status == INCORRECT) {
                                /*
                                 * To quote RFC 4601, "For interoperability
@@ -680,13 +680,13 @@ pimv2_print(netdissect_options *ndo,
                                 * calculated over the entire PIM Register
                                 * message should also be accepted."
                                 */
-                               cksum_status = pimv2_check_checksum(bp, bp2, len);
+                               cksum_status = pimv2_check_checksum(ndo, bp, bp2, len);
                        }
                } else {
                        /*
                         * The checksum covers the entire packet.
                         */
-                       cksum_status = pimv2_check_checksum(bp, bp2, len);
+                       cksum_status = pimv2_check_checksum(ndo, bp, bp2, len);
                }
                switch (cksum_status) {