]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-bt.c
TCP: Add a test with data in the RST segment
[tcpdump] / print-bt.c
index d65a5ff820037b06de4af699f30371c809b86a2c..131bc7119683b8be1201119b34172eec4fefe117 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "netdissect-stdinc.h"
 
+#define ND_LONGJMP_FROM_TCHECK
 #include "netdissect.h"
 #include "extract.h"
 
@@ -55,12 +56,8 @@ bt_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *
 
        ndo->ndo_protocol = "bluetooth";
        nd_print_protocol(ndo);
-       if (caplen < BT_HDRLEN) {
-               ndo->ndo_ll_header_length += caplen;
-               nd_print_trunc(ndo);
-               return;
-       }
-       ndo->ndo_ll_header_length += BT_HDRLEN;
+       ND_TCHECK_LEN(p, BT_HDRLEN);
+       ndo->ndo_ll_hdr_len += BT_HDRLEN;
        caplen -= BT_HDRLEN;
        length -= BT_HDRLEN;
        p += BT_HDRLEN;
@@ -70,6 +67,5 @@ bt_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *
 
        if (!ndo->ndo_suppress_default_print)
                ND_DEFAULTPRINT(p, caplen);
-       return;
 }
 #endif