diff options
author | Richard Sharpe <realrichardsharpe@gmail.com> | 2017-07-11 07:08:04 -0700 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2017-07-12 09:54:11 +0000 |
commit | aa78d3c79a1d277122e3f372e06096a85d8c844a (patch) | |
tree | 4e3452b28a53c9e4c38599eed54b51d9e6aeeefb | |
parent | a591436d73517e07f60e2090042c93c42e233441 (diff) |
Correct the dissection of zero-length SSIDs to show them as Wildcard SSIDs as
per 802.11 2012 8.4.2.2 SSID Element.
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Change-Id: I3ee2fc45063bc1ee6cb1244771e6c1452f6704e4
Reviewed-on: https://code.wireshark.org/review/22591
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 6fe9138042..4a14344e37 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -13872,6 +13872,19 @@ ieee80211_tag_ssid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da * We also need a better way of getting the display format of a * string value, so we can do something other than run it through * format_text(), which won't handle UTF-8. + * + * Addendum: 802.11 2012 points out that a Zero-length SSID means + * the Wildcard SSID. Make it so. From 8.4.2.2 of 802.11 2012: + * + * "The length of the SSID field is between 0 and 32 octets. A SSID + * field of length 0 is used within Probe Request management frames to + * indicate the wildcard SSID. The wildcard SSID is also used in + * Beacon and Probe Response frames transmitted by mesh STAs." + * + * Also, we have to return a non-zero value here to prevent an ugly + * undissected field warning. Since this code is only called from + * one place and is used in call to dissector_try_uint_new, it is + * OK to do so. */ ssid = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, ssid_len, ENC_ASCII); if (ssid_len == (gint)tag_len) { @@ -13890,9 +13903,10 @@ ieee80211_tag_ssid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da memcpy(wlan_stats.ssid, ssid, MIN(ssid_len, MAX_SSID_LEN)); wlan_stats.ssid_len = ssid_len; } else { - proto_item_append_text(field_data->item_tag, ": Broadcast"); + proto_item_append_text(field_data->item_tag, ": Wildcard SSID"); - col_append_str(pinfo->cinfo, COL_INFO, ", SSID=Broadcast"); + col_append_str(pinfo->cinfo, COL_INFO, ", SSID=Wildcard (Broadcast)"); + offset += 1; // Make sure we return non-zero } beacon_padding += 1; /* padding bug */ |