Skip to content

ieee80211: Handle UTF-8 SSIDs and unspecified charsets

John Thacker requested to merge johnthacker/wireshark:ieee80211_ssid_utf8 into master

IEEE 802.11 SSID fields are officially unspecified encoding but probably UTF-8 (and likely ASCII, with which UTF-8 is backwards compatible), unless the Extended Capabilities bit indicating that it's definitely UTF-8 is set.

Get the SSID bytes as a raw byte string without any encoding validation for sending to Dot11Decrypt, and add it to the tree as a FT_BYTES with BASE_SHOW_UTF_8_PRINTABLE, which does the right thing most of the time, and more often than now. In practice this does most of #16208.

To really finish the job, the Extended Capabilities bit needs to be checked, but not only does that bit come in a later tagged element than the SSID, it's not necessarily sent, and for Responses we'd have to track if the bit was set in a corresponding Request in the same conversation. However, it's not clear that any drivers actually do set the bit. (In all the captures I've seen with UTF-8 or even non ASCII/non UTF-8 SSIDs, the bit was unset.)

Merge request reports