aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2017-08-17 13:26:35 +0200
committerMichael Mann <mmann78@netscape.net>2017-08-17 13:13:22 +0000
commit8625c1902d41735a34a3698f4cbbbac6cc21290a (patch)
tree59e086599b36151f40d3a1a4b5e7ba047724c150
parentd56de21d6a56b1897c420802294359b1678bc40a (diff)
802.11: Add dissection of BSS Transition candidate List entries
It is a list of Neighbor report (for request and response) Missing dissection of Neighbor Sublelement 0x03 (BSS Transition Candidate Preference) Issue reported by Mark Williams Bug: 13985 Change-Id: Ic3871866ba4779ee69e91d6d57b46926466b340c Reviewed-on: https://code.wireshark.org/review/23107 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/packet-ieee80211.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 81069ad523..3d9ff03bf2 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -8300,6 +8300,8 @@ wnm_bss_trans_mgmt_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
int start = offset;
guint8 mode;
gint left;
+ int tmp_sublen;
+ const guint8 ids[] = { TAG_NEIGHBOR_REPORT };
static const int *ieee80211_ff_request_flags[] = {
&hf_ieee80211_ff_request_mode_pref_cand,
@@ -8345,7 +8347,15 @@ wnm_bss_trans_mgmt_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
if (left > 0) {
proto_tree_add_item(tree, hf_ieee80211_ff_bss_transition_candidate_list_entries,
tvb, offset, left, ENC_NA);
- offset += left;
+
+ while (left > 0){
+ tmp_sublen = tvb_get_guint8(tvb, offset + 1);
+ if(add_tagged_field(pinfo, tree, tvb, offset, 0, ids, G_N_ELEMENTS(ids), NULL) == 0){
+ break;
+ }
+ left -= (tmp_sublen + 2);
+ offset += (tmp_sublen + 2);
+ }
}
return offset - start;
@@ -8358,6 +8368,8 @@ wnm_bss_trans_mgmt_resp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
int start = offset;
guint8 code;
gint left;
+ int tmp_sublen;
+ const guint8 ids[] = { TAG_NEIGHBOR_REPORT };
offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
@@ -8372,7 +8384,14 @@ wnm_bss_trans_mgmt_resp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
if (left > 0) {
proto_tree_add_item(tree, hf_ieee80211_ff_bss_transition_candidate_list_entries,
tvb, offset, left, ENC_NA);
- offset += left;
+ while (left > 0){
+ tmp_sublen = tvb_get_guint8(tvb, offset + 1);
+ if(add_tagged_field(pinfo, tree, tvb, offset, 0, ids, G_N_ELEMENTS(ids), NULL) == 0){
+ break;
+ }
+ left -= (tmp_sublen + 2);
+ offset += (tmp_sublen + 2);
+ }
}
return offset - start;