]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Remove 7 more ND_TCHECK calls.
authorDenis Ovsienko <[email protected]>
Tue, 8 Sep 2020 15:16:38 +0000 (16:16 +0100)
committerDenis Ovsienko <[email protected]>
Tue, 8 Sep 2020 15:23:56 +0000 (16:23 +0100)
print-ahcp.c
print-bgp.c
print-isoclns.c
print-vrrp.c

index d5b2cc0d506a3f0f4a2924102b9ebc17e4928613..d7bf5ec4e0e6b246ff0d760a95d06430ae878645 100644 (file)
@@ -373,11 +373,9 @@ ahcp_print(netdissect_options *ndo, const u_char *cp, const u_int len)
                                ND_PRINT(", Nonce 0x%08x", GET_BE_U_4(cp));
                                cp += 4;
                                /* Source Id */
-                               ND_TCHECK_8(cp);
                                ND_PRINT(", Source Id %s", GET_LINKADDR_STRING(cp, LINKADDR_OTHER, 8));
                                cp += 8;
                                /* Destination Id */
-                               ND_TCHECK_8(cp);
                                ND_PRINT(", Destination Id %s", GET_LINKADDR_STRING(cp, LINKADDR_OTHER, 8));
                                cp += 8;
                        }
index 713e1592714022e5fbf90b74b41038bcb18c9426..ab3e2835539c4bde00573ee4cf293b6034747c41 100644 (file)
@@ -2193,7 +2193,6 @@ bgp_attr_print(netdissect_options *ndo,
                 case (AFNUM_NSAP<<8 | SAFNUM_UNICAST):
                 case (AFNUM_NSAP<<8 | SAFNUM_MULTICAST):
                 case (AFNUM_NSAP<<8 | SAFNUM_UNIMULTICAST):
-                    ND_TCHECK_LEN(tptr, tnhlen);
                     ND_PRINT("%s", GET_ISONSAP_STRING(tptr, tnhlen));
                     tptr += tnhlen;
                     tlen -= tnhlen;
index e842a008a773387945e5938bd606917a5e882eb5..44d1aa73709c9da0318d69ec711e5289c95ec094 100644 (file)
@@ -1022,8 +1022,6 @@ clnp_print(netdissect_options *ndo,
                             }
                             if (source_address_length > 0) {
                                     source_address=(tptr+1);
-                                    ND_TCHECK_LEN(source_address,
-                                                  source_address_length);
                                     ND_PRINT("\n\t    NSAP address (length %u): %s",
                                            source_address_length,
                                            GET_ISONSAP_STRING(source_address, source_address_length));
@@ -2891,7 +2889,6 @@ isis_print(netdissect_options *ndo,
                tlen--;
                if (tlen < alen)
                    goto tlv_trunc;
-               ND_TCHECK_LEN(tptr, alen);
                ND_PRINT("\n\t      Area address (length: %u): %s",
                        alen,
                        GET_ISONSAP_STRING(tptr, alen));
@@ -3459,7 +3456,6 @@ isis_print(netdissect_options *ndo,
                 }
                 if (tlen < prefix_len/2)
                     break;
-                ND_TCHECK_LEN(tptr, prefix_len / 2);
                 ND_PRINT("\n\t\tAddress: %s/%u",
                        GET_ISONSAP_STRING(tptr, prefix_len / 2), prefix_len * 4);
                 tptr+=prefix_len/2;
index 49f42480edaafb4dc1c058e1f5ff1dd76b5d3108..972a8cd79481c4d8bda34053722f9878b91ce4d4 100644 (file)
@@ -120,7 +120,6 @@ vrrp_print(netdissect_options *ndo,
        if (version < 2 || version > 3 || type != VRRP_TYPE_ADVERTISEMENT)
                return;
        ND_PRINT(", vrid %u, prio %u", GET_U_1(bp + 1), GET_U_1(bp + 2));
-       ND_TCHECK_1(bp + 5);
 
        if (version == 2) {
                auth_type = GET_U_1(bp + 4);