]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE: Derive H2E PT while reconnecting to same SSID also
authorSreeramya Soratkal <ssramya@codeaurora.org>
Sat, 31 Jul 2021 10:09:56 +0000 (15:39 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 3 Aug 2021 21:20:09 +0000 (00:20 +0300)
P2P connections in the 6 GHz band use SAE authentication algorithm after
getting credentials with WPS connection. During WPS connection as it
doesn't use SAE, SAE PT is not derived. After getting SAE credentials,
the STA connects to the same SSID using SAE auth algorithm. Earlier, SAE
H2E PT was not derived while connecting to the same SSID to which the
STA is connected last time. Due to this, the P2P group formation fails
for 6 GHz channels when H2E is enabled as the PT will not be setup by
the P2P client before proceeding to the SAE authentication. Same could
happen with infrastructure WPS when wps_cred_add_sae=1 is used.

Set up the SAE H2E PT while connecting to the same SSID again also to
make sure that the H2E PT is set up in the STA to derive the PWE for
successful SAE authentication. The PT derivation will be skipped in
wpa_s_setup_sae_pt() if PT is already available for that SSID.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
wpa_supplicant/wpa_supplicant.c

index cc184dba5febf8b439b7e5989c4ea73d5325188b..066b624c173a08b5f11198778b0d054a8f042af3 100644 (file)
@@ -2220,9 +2220,11 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
        } else {
 #ifdef CONFIG_SAE
                wpa_s_clear_sae_rejected(wpa_s);
-               wpa_s_setup_sae_pt(wpa_s->conf, ssid);
 #endif /* CONFIG_SAE */
        }
+#ifdef CONFIG_SAE
+       wpa_s_setup_sae_pt(wpa_s->conf, ssid);
+#endif /* CONFIG_SAE */
 
        if (rand_style > 0 && !wpa_s->reassoc_same_ess) {
                if (wpas_update_random_addr(wpa_s, rand_style) < 0)