diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2015-04-10 11:43:57 +0300 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-04-13 10:32:25 +0200 |
commit | 47a7037955bfa7405a0a676f214c26d136b8ca9a (patch) | |
tree | 7d442b8d8131e6d3dfcfc47a462a732278331a2c /dissector.c | |
parent | 06200b94b91cdf80d23a15de00145147ffd1174e (diff) |
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 <vadim4j@gmail.com>
[tklauser: whitespace changes]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'dissector.c')
-rw-r--r-- | dissector.c | 3 |
1 files changed, 3 insertions, 0 deletions
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(); |