X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/121340f51409c65277b29b89d3ddbc8f1083d051..91d032ddef9c198e4a78bccebbe33b38b6f5949b:/print-udld.c?ds=inline diff --git a/print-udld.c b/print-udld.c index 7bc8acec..fd6fdf91 100644 --- a/print-udld.c +++ b/print-udld.c @@ -24,7 +24,7 @@ #include -#include "netdissect.h" +#include "interface.h" #include "extract.h" #define UDLD_HEADER_LEN 4 @@ -88,8 +88,7 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length) tptr = pptr; - if (!ND_TTEST2(*tptr, UDLD_HEADER_LEN)) - goto trunc; + ND_TCHECK2(*tptr, UDLD_HEADER_LEN); code = UDLD_EXTRACT_OPCODE(*tptr); @@ -114,8 +113,7 @@ udld_print (netdissect_options *ndo, const u_char *pptr, u_int length) while (tptr < (pptr+length)) { - if (!ND_TTEST2(*tptr, 4)) - goto trunc; + ND_TCHECK2(*tptr, 4); type = EXTRACT_16BITS(tptr); len = EXTRACT_16BITS(tptr+2);