OWE: Do not update the BSS entry with zero length SSID for transition
Overwriting of SSID for the hidden OWE BSS entry has some side effects:
- first the entry is notified over DBus with empty SSID and the update
of SSID is never signaled (it is not even possible at the moment to
notify the SSID change - see wpas_dbus_bss_signal_prop_changed()),
- during (and after) association there will be multiple entries
referring to the same BSSID/SSID pair.
Stop overwriting the SSID in an existing BSS entry based on OWE
transition mode information. Instead, depend on a new BSS entry getting
added for the hidden OWE BSS based on active scans for the SSID learned
from the open BSS. This would not have been sufficient for the initial
OWE design, but with the optimized scanning behavior from commit
c04562e67e
("OWE: Improve discovery of OWE transition mode AP"), this
can now depend on the exact same mechanism as other uses of hidden
SSIDs. This helps in keeping the D-Bus interface in sync with the BSS
parameters.
Signed-off-by: Andrzej Ostruszka <andrzejo@chromium.org>
This commit is contained in:
parent
9c97126576
commit
00b3125871
1 changed files with 0 additions and 43 deletions
|
@ -1097,7 +1097,6 @@ static void owe_trans_ssid(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
|||
#ifdef CONFIG_OWE
|
||||
const u8 *owe, *pos, *end, *bssid;
|
||||
u8 ssid_len;
|
||||
struct wpa_bss *open_bss;
|
||||
|
||||
owe = wpa_bss_get_vendor_ie(bss, OWE_IE_VENDOR_TYPE);
|
||||
if (!owe || !wpa_bss_get_ie(bss, WLAN_EID_RSN))
|
||||
|
@ -1138,48 +1137,6 @@ static void owe_trans_ssid(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bss->ssid_len > 0)
|
||||
return;
|
||||
|
||||
open_bss = wpa_bss_get_bssid_latest(wpa_s, bssid);
|
||||
if (!open_bss)
|
||||
return;
|
||||
if (ssid_len != open_bss->ssid_len ||
|
||||
os_memcmp(pos, open_bss->ssid, ssid_len) != 0) {
|
||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||
"OWE: transition mode SSID mismatch: %s",
|
||||
wpa_ssid_txt(open_bss->ssid, open_bss->ssid_len));
|
||||
return;
|
||||
}
|
||||
|
||||
owe = wpa_bss_get_vendor_ie(open_bss, OWE_IE_VENDOR_TYPE);
|
||||
if (!owe || wpa_bss_get_ie(open_bss, WLAN_EID_RSN)) {
|
||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||
"OWE: transition mode open BSS unexpected info");
|
||||
return;
|
||||
}
|
||||
|
||||
pos = owe + 6;
|
||||
end = owe + 2 + owe[1];
|
||||
|
||||
if (end - pos < ETH_ALEN + 1)
|
||||
return;
|
||||
if (os_memcmp(pos, bss->bssid, ETH_ALEN) != 0) {
|
||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||
"OWE: transition mode BSSID mismatch: " MACSTR,
|
||||
MAC2STR(pos));
|
||||
return;
|
||||
}
|
||||
pos += ETH_ALEN;
|
||||
ssid_len = *pos++;
|
||||
if (end - pos < ssid_len || ssid_len > SSID_MAX_LEN)
|
||||
return;
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "OWE: learned transition mode OWE SSID: %s",
|
||||
wpa_ssid_txt(pos, ssid_len));
|
||||
os_memcpy(bss->ssid, pos, ssid_len);
|
||||
bss->ssid_len = ssid_len;
|
||||
bss->flags |= WPA_BSS_OWE_TRANSITION;
|
||||
#endif /* CONFIG_OWE */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue