| Summary: | Can't decode ssid - duplicate SSID Element in Beacon | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Tom Jones <thj> |
| Component: | wireless | Assignee: | Bjoern A. Zeeb <bz> |
| Status: | Closed Not A Bug | ||
| Severity: | Affects Only Me | CC: | bz |
| Priority: | --- | ||
| Version: | CURRENT | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Tom Jones
2022-11-23 15:44:03 UTC
Sorry I cannot follow you yet. wlan1 says ssid BTWi-fi Chan 6. wlan0 list scan says: BTWi-fi 7a:65:59:b7:65:33 6 54M -87:-96 100 E BSSLOAD HTCAP WME wlan1 list scan says: BTWi-fi 7a:65:59:b7:65:33 6 54M -91:-95 100 E BSSLOAD HTCAP WME So I assume the problematic one is the TALKTALKXXXXXX ? Are you running any of the patches for ifconfig to decode UTF-8 or any other changes? Also why is sharing a pcap with just beacons a problem or does it contain other traffic as well? Can you drop me an off-list email to clarify details to avoid sharing them publicly and we can work through it? This is not iwlwifi specific.
The beacon information from the AP has a Qualcomm Vendor information followed by a second SSID Element at the end which likely is a firmware bug in the AP. Could be that it turns out that way by accident but is all speculation. The remaining data did not look like a particular other element with an unset element id.
A quick hack filtering out any second SSID made things work again but that is not a sustainable solution; in fact we probably want to make sure in the future to drop these kind of beacons.
--- sys/net80211/ieee80211_input.c
+++ sys/net80211/ieee80211_input.c
@@ -565,8 +565,15 @@ ieee80211_parse_beacon(struct ieee80211_node *ni, struct mbuf *m,
return (scan->status = IEEE80211_BPARSE_BADIELEN));
switch (*frm) {
case IEEE80211_ELEMID_SSID:
- scan->ssid = frm;
+ {
+ if (scan->ssid != 0) {
+ IEEE80211_DPRINTF(vap, IEEE80211_MSG_ELEMID,
+ "%s: duplicate ELEMID_SSID orig %p new %p (ignoring)\n",
+ __func__, scan->ssid, frm);
+ } else
+ scan->ssid = frm;
break;
+ }
case IEEE80211_ELEMID_RATES:
scan->rates = frm;
break;
I haven't looked at rtwn yet as-to why they pass the first SSID up and thj sees the right one only there. Possibly some magic elsewhere? Would be interesting to write test cases with raw frames and try some others but this would mean access to more wifi or the AP DUT.
|