From: Guy Harris Date: Tue, 13 Nov 2018 06:56:24 +0000 (-0800) Subject: Handle radiotap+802.11 for DLT_LINUX_SLL2 as well. X-Git-Tag: tcpdump-4.99-bp~961 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/9edeb142527f29a6e31425b4280c9be0a7962c47 Handle radiotap+802.11 for DLT_LINUX_SLL2 as well. --- diff --git a/print-sll.c b/print-sll.c index 1ce25259..e87bd032 100644 --- a/print-sll.c +++ b/print-sll.c @@ -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: