X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/855bbe873d1d2d2a5e5ef950d060ed394cf27d94..d9a787e4995b4b5101e410ed1e93367907ab9fe2:/print-slow.c diff --git a/print-slow.c b/print-slow.c index 467a1d6f..11838180 100644 --- a/print-slow.c +++ b/print-slow.c @@ -26,6 +26,7 @@ #include "netdissect-stdinc.h" +#define ND_LONGJMP_FROM_TCHECK #include "netdissect.h" #include "extract.h" #include "addrtoname.h" @@ -359,7 +360,6 @@ slow_marker_lacp_print(netdissect_options *ndo, if (tlen < sizeof(struct tlv_header_t)) goto tooshort; /* did we capture enough for fully decoding the tlv header ? */ - ND_TCHECK_LEN(tptr, sizeof(struct tlv_header_t)); tlv_header = (const struct tlv_header_t *)tptr; tlv_type = GET_U_1(tlv_header->type); tlv_len = GET_U_1(tlv_header->length); @@ -474,10 +474,6 @@ slow_marker_lacp_print(netdissect_options *ndo, tooshort: ND_PRINT("\n\t\t packet is too short"); - return; - -trunc: - nd_print_trunc(ndo); } static void @@ -630,7 +626,6 @@ slow_oam_print(netdissect_options *ndo, ptr.slow_oam_tlv_header = (const struct slow_oam_tlv_header_t *)tptr; if (tlen < sizeof(*ptr.slow_oam_tlv_header)) goto tooshort; - ND_TCHECK_SIZE(ptr.slow_oam_tlv_header); type = GET_U_1(ptr.slow_oam_tlv_header->type); length = GET_U_1(ptr.slow_oam_tlv_header->length); ND_PRINT("\n\t %s Link Event Type (%u), length %u", @@ -712,7 +707,6 @@ slow_oam_print(netdissect_options *ndo, tlv.slow_oam_loopbackctrl = (const struct slow_oam_loopbackctrl_t *)tptr; if (tlen < sizeof(*tlv.slow_oam_loopbackctrl)) goto tooshort; - ND_TCHECK_SIZE(tlv.slow_oam_loopbackctrl); command = GET_U_1(tlv.slow_oam_loopbackctrl->command); ND_PRINT("\n\t Command %s (%u)", tok2str(slow_oam_loopbackctrl_cmd_values, @@ -740,8 +734,4 @@ slow_oam_print(netdissect_options *ndo, tooshort: ND_PRINT("\n\t\t packet is too short"); - return; - -trunc: - nd_print_trunc(ndo); }