From: Sreeramya Soratkal Date: Sat, 31 Jul 2021 10:09:56 +0000 (+0530) Subject: SAE: Derive H2E PT while reconnecting to same SSID also X-Git-Tag: hostap_2_10~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49442194c4b6158d1f177290807135c361b997ed;p=thirdparty%2Fhostap.git SAE: Derive H2E PT while reconnecting to same SSID also 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 --- diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index cc184dba5..066b624c1 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -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)