]> The Tcpdump Group git mirrors - tcpdump/commitdiff
ICMP: Replace ND_TTEST2 calls by ND_TTEST_LEN calls
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 14 Dec 2017 21:15:11 +0000 (22:15 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 14 Dec 2017 21:16:55 +0000 (22:16 +0100)
print-icmp.c

index 4ebd977b7a4a0751051e6aa8fec3aa1f97f00299..a9a72014fbef7151ee52eed22860449397cd4833 100644 (file)
@@ -602,7 +602,7 @@ icmp_print(netdissect_options *ndo, const u_char *bp, u_int plen, const u_char *
              * however not all implementations set the length field proper.
              */
             if (!ext_dp->icmp_length &&
              * however not all implementations set the length field proper.
              */
             if (!ext_dp->icmp_length &&
-                ND_TTEST2(ext_dp->icmp_ext_version_res, plen - ICMP_EXTD_MINLEN)) {
+                ND_TTEST_LEN(ext_dp->icmp_ext_version_res, plen - ICMP_EXTD_MINLEN)) {
                 vec[0].ptr = (const uint8_t *)(const void *)&ext_dp->icmp_ext_version_res;
                 vec[0].len = plen - ICMP_EXTD_MINLEN;
                 if (in_cksum(vec, 1)) {
                 vec[0].ptr = (const uint8_t *)(const void *)&ext_dp->icmp_ext_version_res;
                 vec[0].len = plen - ICMP_EXTD_MINLEN;
                 if (in_cksum(vec, 1)) {
@@ -623,7 +623,7 @@ icmp_print(netdissect_options *ndo, const u_char *bp, u_int plen, const u_char *
             }
 
             hlen = plen - ICMP_EXTD_MINLEN;
             }
 
             hlen = plen - ICMP_EXTD_MINLEN;
-            if (ND_TTEST2(ext_dp->icmp_ext_version_res, hlen)) {
+            if (ND_TTEST_LEN(ext_dp->icmp_ext_version_res, hlen)) {
                 vec[0].ptr = (const uint8_t *)(const void *)&ext_dp->icmp_ext_version_res;
                 vec[0].len = hlen;
                 ND_PRINT((ndo, ", checksum 0x%04x (%scorrect), length %u",
                 vec[0].ptr = (const uint8_t *)(const void *)&ext_dp->icmp_ext_version_res;
                 vec[0].len = hlen;
                 ND_PRINT((ndo, ", checksum 0x%04x (%scorrect), length %u",