]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-symantec.c
gre: add support for MikroTik Ethernet-over-IP hack.
[tcpdump] / print-symantec.c
index 8fe0c79fe644315dad09b5197f97cdfcb5fec5e3..0d394e30f2ec8b79becd4b825c35154bcaffce85 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "netdissect-stdinc.h"
 
+#define ND_LONGJMP_FROM_TCHECK
 #include "netdissect.h"
 #include "extract.h"
 #include "ethertype.h"
@@ -78,11 +79,7 @@ symantec_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_
        u_short ether_type;
 
        ndo->ndo_protocol = "symantec";
-       if (caplen < sizeof (struct symantec_header)) {
-               ndo->ndo_ll_hdr_len += caplen;
-               nd_print_trunc(ndo);
-               return;
-       }
+       ND_TCHECK_LEN(p, sizeof(struct symantec_header));
 
        ndo->ndo_ll_hdr_len += sizeof (struct symantec_header);
        if (ndo->ndo_eflag)