X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/5c6c98f2c58103f20f5cbc933bdf0a1406366b43..be6722e465c65e3e5f3fc97c1be54a74ca2a609e:/print-loopback.c diff --git a/print-loopback.c b/print-loopback.c index e9d0b1a2..b606de02 100644 --- a/print-loopback.c +++ b/print-loopback.c @@ -29,7 +29,8 @@ /* * originally defined as the Ethernet Configuration Testing Protocol. - * specification: https://www.mit.edu/people/jhawk/ctp.pdf + * specification: + * https://web.archive.org/web/20060919181108/http://www.mit.edu/people/jhawk/ctp.pdf */ #ifdef HAVE_CONFIG_H @@ -38,6 +39,7 @@ #include "netdissect-stdinc.h" +#define ND_LONGJMP_FROM_TCHECK #include "netdissect.h" #include "extract.h" #include "addrtoname.h" @@ -79,12 +81,12 @@ loopback_message_print(netdissect_options *ndo, ND_TCHECK_LEN(cp, len); break; case LOOPBACK_FWDDATA: - if (len < MAC_ADDR_LEN) + if (len < MAC48_LEN) goto invalid; /* forwarding address */ - ND_PRINT(", forwarding address %s", GET_ETHERADDR_STRING(cp)); - cp += MAC_ADDR_LEN; - len -= MAC_ADDR_LEN; + ND_PRINT(", forwarding address %s", GET_MAC48_STRING(cp)); + cp += MAC48_LEN; + len -= MAC48_LEN; /* data */ ND_PRINT(", data (%u octets)", len); ND_TCHECK_LEN(cp, len); @@ -98,9 +100,6 @@ loopback_message_print(netdissect_options *ndo, invalid: nd_print_invalid(ndo); ND_TCHECK_LEN(cp, len); - return; -trunc: - nd_trunc(ndo); } void @@ -133,8 +132,5 @@ loopback_print(netdissect_options *ndo, invalid: nd_print_invalid(ndo); ND_TCHECK_LEN(cp, len); - return; -trunc: - nd_trunc(ndo); }