forked from osmocom/wireshark
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:
parent
22dcd86ff4
commit
da4ffffd0a
|
@ -3399,6 +3399,7 @@ dissect_advertisement_protocol(packet_info *pinfo, proto_tree *tree,
|
||||||
if (anqp)
|
if (anqp)
|
||||||
*anqp = FALSE;
|
*anqp = FALSE;
|
||||||
tag_no = tvb_get_guint8(tvb, offset);
|
tag_no = tvb_get_guint8(tvb, offset);
|
||||||
|
if (anqp)
|
||||||
item = proto_tree_add_item(tree, hf_ieee80211_tag_number, tvb, offset, 1, TRUE);
|
item = proto_tree_add_item(tree, hf_ieee80211_tag_number, tvb, offset, 1, TRUE);
|
||||||
|
|
||||||
tag_len = tvb_get_guint8(tvb, offset + 1);
|
tag_len = tvb_get_guint8(tvb, offset + 1);
|
||||||
|
@ -3408,8 +3409,11 @@ dissect_advertisement_protocol(packet_info *pinfo, proto_tree *tree,
|
||||||
"Protocol)", tag_no);
|
"Protocol)", tag_no);
|
||||||
return 2 + tag_len;
|
return 2 + tag_len;
|
||||||
}
|
}
|
||||||
|
if (anqp)
|
||||||
item = proto_tree_add_uint(tree, hf_ieee80211_tag_length, tvb, offset + 1, 1, tag_len);
|
item = proto_tree_add_uint(tree, hf_ieee80211_tag_length, tvb, offset + 1, 1, tag_len);
|
||||||
if (tag_len < 2) {
|
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,
|
expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
|
||||||
"Advertisement Protocol: IE must be at least 2 "
|
"Advertisement Protocol: IE must be at least 2 "
|
||||||
"octets long");
|
"octets long");
|
||||||
|
|
Loading…
Reference in New Issue