mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
fix(wifi): Fix skipping usage of supp pmk caching for some cases
This commit is contained in:
@@ -282,7 +282,7 @@ uint16_t esp_wifi_sta_pmf_enabled(void);
|
||||
wifi_cipher_type_t esp_wifi_sta_get_mgmt_group_cipher(void);
|
||||
int esp_wifi_set_igtk_internal(uint8_t if_index, const wifi_wpa_igtk_t *igtk);
|
||||
esp_err_t esp_wifi_internal_issue_disconnect(uint8_t reason_code);
|
||||
bool esp_wifi_skip_supp_pmkcaching(void);
|
||||
bool esp_wifi_use_supp_pmk_cache(void);
|
||||
bool esp_wifi_is_rm_enabled_internal(uint8_t if_index);
|
||||
bool esp_wifi_is_btm_enabled_internal(uint8_t if_index);
|
||||
esp_err_t esp_wifi_register_mgmt_frame_internal(uint32_t type, uint32_t subtype);
|
||||
|
||||
@@ -35,6 +35,12 @@ static esp_err_t wpa3_build_sae_commit(u8 *bssid, size_t *sae_msg_len)
|
||||
const u8 *pw = (const u8 *)esp_wifi_sta_get_prof_password_internal();
|
||||
char sae_pwd_id[SAE_H2E_IDENTIFIER_LEN + 1] = {0};
|
||||
bool valid_pwd_id = false;
|
||||
|
||||
if (wpa_sta_cur_pmksa_matches_akm()) {
|
||||
wpa_printf(MSG_INFO, "wpa3: Skip SAE and use cached PMK instead");
|
||||
*sae_msg_len = 0;
|
||||
return ESP_FAIL;
|
||||
}
|
||||
#ifdef CONFIG_SAE_H2E
|
||||
uint8_t sae_pwe = esp_wifi_get_config_sae_pwe_h2e_internal(WIFI_IF_STA);
|
||||
const u8 *rsnxe = NULL;
|
||||
@@ -107,12 +113,6 @@ static esp_err_t wpa3_build_sae_commit(u8 *bssid, size_t *sae_msg_len)
|
||||
}
|
||||
#endif /* CONFIG_SAE_H2E */
|
||||
|
||||
if (wpa_sta_cur_pmksa_matches_akm()) {
|
||||
wpa_printf(MSG_INFO, "wpa3: Skip SAE and use cached PMK instead");
|
||||
*sae_msg_len = 0;
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
if (g_sae_commit) {
|
||||
wpabuf_free(g_sae_commit);
|
||||
g_sae_commit = NULL;
|
||||
|
||||
@@ -2646,7 +2646,7 @@ int wpa_set_bss(uint8_t *macddr, uint8_t *bssid, uint8_t pairwise_cipher, uint8_
|
||||
{
|
||||
int res = 0;
|
||||
struct wpa_sm *sm = &gWpaSm;
|
||||
bool use_pmk_cache = !esp_wifi_skip_supp_pmkcaching();
|
||||
bool use_pmk_cache = esp_wifi_use_supp_pmk_cache();
|
||||
uint8_t assoc_ie[128] = {0};
|
||||
uint16_t assoc_ie_len = sizeof(assoc_ie);
|
||||
bool reassoc_same_ess = false;
|
||||
|
||||
Reference in New Issue
Block a user