]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE: Make sure BSS entry is available to determine RSNXE information
authorShivani Baranwal <quic_shivbara@quicinc.com>
Tue, 7 Dec 2021 08:25:24 +0000 (13:55 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 20 Dec 2021 22:06:19 +0000 (00:06 +0200)
wpa_supplicant may use wrong SAE authentication method if it doesn't
have the scan result for the target BSS since RSNXE information is not
available.

For example, STA might use the hunting-and-pecking loop method for SAE
authentication even though AP supports SAE H2E and STA is configured
with sae_pwe=2.

This is possible in cases like EXTERNAL_AUTH triggered by the driver
during roaming. To avoid this update scan results to fetch the target
BSS scan result from the driver.

Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
wpa_supplicant/sme.c

index 7f28708de66bf7fd10fe44746e9fd3fa90218d6b..1dc7001a7305cc6a5ceffff0f976ac344f9c8ecb 100644 (file)
@@ -137,6 +137,12 @@ static struct wpabuf * sme_auth_build_sae_commit(struct wpa_supplicant *wpa_s,
        }
 
        bss = wpa_bss_get_bssid_latest(wpa_s, bssid);
+       if (!bss) {
+               wpa_printf(MSG_DEBUG,
+                          "SAE: BSS not available, update scan result to get BSS");
+               wpa_supplicant_update_scan_results(wpa_s);
+               bss = wpa_bss_get_bssid_latest(wpa_s, bssid);
+       }
        if (bss) {
                const u8 *rsnxe;