]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ipfc.c
DNS: Sync types with IANA
[tcpdump] / print-ipfc.c
index 5222e51248e3207f7e964ef098daaa1fcd753f28..ab5a81312f68832584634c225c3304bcae859e6f 100644 (file)
@@ -31,6 +31,7 @@
 
 #include <string.h>
 
+#define ND_LONGJMP_FROM_TCHECK
 #include "netdissect.h"
 #include "addrtoname.h"
 
@@ -95,12 +96,10 @@ ipfc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
        int llc_hdrlen;
 
        ndo->ndo_protocol = "ipfc";
-       if (caplen < IPFC_HDRLEN)
-               goto trunc;
+       ND_TCHECK_LEN(p, IPFC_HDRLEN);
        /*
         * Get the network addresses into a canonical form
         */
-       ND_TCHECK_SIZE(ipfcp);
        extract_ipfc_addrs(ipfcp, (char *)srcmac, (char *)dstmac);
 
        if (ndo->ndo_eflag)
@@ -128,9 +127,6 @@ ipfc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
                llc_hdrlen = -llc_hdrlen;
        }
        return (IPFC_HDRLEN + llc_hdrlen);
-trunc:
-       nd_print_trunc(ndo);
-       return caplen;
 }
 
 /*