]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Handle radiotap+802.11 for DLT_LINUX_SLL2 as well.
authorGuy Harris <[email protected]>
Tue, 13 Nov 2018 06:56:24 +0000 (22:56 -0800)
committerGuy Harris <[email protected]>
Tue, 13 Nov 2018 06:56:24 +0000 (22:56 -0800)
print-sll.c

index 1ce25259b8972d9efc5189ffe20c3f25263c4bb3..e87bd032765d31e2d5a165a60e737e4e6bec3961 100644 (file)
@@ -404,6 +404,7 @@ sll2_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char
        u_int caplen = h->caplen;
        u_int length = h->len;
        const struct sll2_header *sllp;
+       u_short hatype;
        u_short ether_type;
        int llc_hdrlen;
        u_int hdrlen;
@@ -443,6 +444,16 @@ sll2_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char
        p += SLL2_HDR_LEN;
        hdrlen = SLL2_HDR_LEN;
 
+       hatype = EXTRACT_BE_U_2(sllp->sll2_hatype);
+       switch (hatype) {
+
+       case 803:
+               /*
+                * This is an packet with a radiotap header;
+                * just dissect the payload as such.
+                */
+               return (SLL_HDR_LEN + ieee802_11_radio_print(ndo, p, length, caplen));
+       }
        ether_type = EXTRACT_BE_U_2(sllp->sll2_protocol);
 
 recurse: