From Jouni Malinen:

ieee80211: Do not add duplicate tag number/len for adv proto

dissect_advertisement_protocol() is used both for ANQP and for parsing
IEs. The tag number/length fields need to be added only for ANQP to
avoid adding duplicate entries in the proto tree.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6339

svn path=/trunk/; revision=39006
This commit is contained in:
Anders Broman 2011-09-15 06:46:57 +00:00
parent 22dcd86ff4
commit da4ffffd0a
1 changed files with 6 additions and 2 deletions

View File

@ -3399,7 +3399,8 @@ dissect_advertisement_protocol(packet_info *pinfo, proto_tree *tree,
if (anqp)
*anqp = FALSE;
tag_no = tvb_get_guint8(tvb, offset);
item = proto_tree_add_item(tree, hf_ieee80211_tag_number, tvb, offset, 1, TRUE);
if (anqp)
item = proto_tree_add_item(tree, hf_ieee80211_tag_number, tvb, offset, 1, TRUE);
tag_len = tvb_get_guint8(tvb, offset + 1);
if (tag_no != TAG_ADVERTISEMENT_PROTOCOL) {
@ -3408,8 +3409,11 @@ dissect_advertisement_protocol(packet_info *pinfo, proto_tree *tree,
"Protocol)", tag_no);
return 2 + tag_len;
}
item = proto_tree_add_uint(tree, hf_ieee80211_tag_length, tvb, offset + 1, 1, tag_len);
if (anqp)
item = proto_tree_add_uint(tree, hf_ieee80211_tag_length, tvb, offset + 1, 1, tag_len);
if (tag_len < 2) {
if (!anqp)
item = proto_tree_add_uint(tree, hf_ieee80211_tag_length, tvb, offset + 1, 1, tag_len);
expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
"Advertisement Protocol: IE must be at least 2 "
"octets long");