From 47a7037955bfa7405a0a676f214c26d136b8ca9a Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Fri, 10 Apr 2015 11:43:57 +0300 Subject: netsniff-ng: Consider radiotap header of monitor dev netsniff-ng does not check if monitor device includes radiotap header which leads to the wrong 802.11 frame parsing. Tested if the .pcap file is understandable by wireshark and if dump info is basically correct, but did not test the case when xmit packets from .pcap file to the output device and from the input device to the output device. Signed-off-by: Vadim Kochan [tklauser: whitespace changes] Signed-off-by: Tobias Klauser --- dissector.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'dissector.c') diff --git a/dissector.c b/dissector.c index ccc9b3c..7c8ba39 100644 --- a/dissector.c +++ b/dissector.c @@ -69,6 +69,7 @@ void dissector_entry_point(uint8_t *packet, size_t len, int linktype, int mode) return; pkt = pkt_alloc(packet, len); + pkt->link_type = linktype; switch (linktype) { case LINKTYPE_EN10MB: @@ -76,6 +77,8 @@ void dissector_entry_point(uint8_t *packet, size_t len, int linktype, int mode) proto_start = dissector_get_ethernet_entry_point(); proto_end = dissector_get_ethernet_exit_point(); break; + case LINKTYPE_IEEE802_11_RADIOTAP: + case ___constant_swab32(LINKTYPE_IEEE802_11_RADIOTAP): case LINKTYPE_IEEE802_11: case ___constant_swab32(LINKTYPE_IEEE802_11): proto_start = dissector_get_ieee80211_entry_point(); -- cgit v1.2.3-54-g00ecf