aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2015-04-05 22:11:36 -0400
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2015-04-07 15:23:25 +0000
commitd3f2d8ce4f0b20243853092f852b8bc82f722bb5 (patch)
tree1908693a72b8ff4adfeb871147b0ee4a534a96c3
parent9e724f764566cc134b01dc060c4edce035944289 (diff)
ieee80211.c: "IEEE 802.11 plus Network Monitor radio header" encap: Fix dissection
Specifically: Management/Control frames saved by Microsoft Netmon (3.4?) with "IEEE 802.11 plus Network Monitor radio header" encapsulation may or may not be saved with an FCS. See Bug 11105. Fix: Use "check fcs" preference to specify whether Management & Control frames have an fcs for this encapsulation. Change-Id: Ibd0be7b4765c2df2b959cb2234aeed027266246b Reviewed-on: https://code.wireshark.org/review/7939 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r--epan/dissectors/packet-ieee80211.c7
-rw-r--r--wiretap/netmon.c11
2 files changed, 12 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 0d475e591c..7853e0f5b6 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -16658,11 +16658,12 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
has_fcs = TRUE;
break;
- case -2: /* Data frames have no FCS, other frames have an FCS */
+ case -2: /* Data frames have no FCS, other frames may have an FCS */
+ /* XXX: -2 currently used only in wiretap/netmon.c */
if (FCF_FRAME_TYPE (fcf) == DATA_FRAME)
has_fcs = FALSE;
- else
- has_fcs = TRUE;
+ else /* Management, Control, Extension */
+ has_fcs = wlan_check_fcs;
break;
default: /* Don't know - use "wlan_check_fcs" */
diff --git a/wiretap/netmon.c b/wiretap/netmon.c
index dc959f5ab8..9a4ad1e999 100644
--- a/wiretap/netmon.c
+++ b/wiretap/netmon.c
@@ -419,9 +419,14 @@ netmon_set_pseudo_header_info(struct wtap_pkthdr *phdr, Buffer *buf)
case WTAP_ENCAP_IEEE_802_11_NETMON:
/*
* It appears to be the case that management
- * frames have an FCS and data frames don't;
- * I'm not sure about control frames. An
- * "FCS length" of -2 means "NetMon weirdness".
+ * frames (and control and extension frames ?) may
+ * or may not have an FCS and data frames don't.
+ * (Netmon capture files have been seen for this
+ * encapsulation having management frames either
+ * completely with or without an FCS. Also: instances have been
+ * seen where both Management and Control frames
+ * do not have an FCS).
+ * An "FCS length" of -2 means "NetMon weirdness".
*/
phdr->pseudo_header.ieee_802_11.presence_flags = 0; /* radio data is in the packet data */
phdr->pseudo_header.ieee_802_11.fcs_len = -2;