mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
Merge branch 'bugfix/supp_pmk_cache_v5.3' into 'release/v5.3'
fix(wifi): Fix skipping usage of supp pmk caching for some cases See merge request espressif/esp-idf!49883
This commit is contained in:
+1
-1
Submodule components/esp_wifi/lib updated: 8a94debc90...abbdc70d7a
@@ -278,7 +278,7 @@ uint16_t esp_wifi_sta_pmf_enabled(void);
|
|||||||
wifi_cipher_type_t esp_wifi_sta_get_mgmt_group_cipher(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);
|
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);
|
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_rm_enabled_internal(uint8_t if_index);
|
||||||
bool esp_wifi_is_btm_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);
|
esp_err_t esp_wifi_register_mgmt_frame_internal(uint32_t type, uint32_t subtype);
|
||||||
|
|||||||
@@ -38,6 +38,12 @@ static esp_err_t wpa3_build_sae_commit(u8 *bssid, size_t *sae_msg_len)
|
|||||||
const u8 *rsnxe;
|
const u8 *rsnxe;
|
||||||
u8 rsnxe_capa = 0;
|
u8 rsnxe_capa = 0;
|
||||||
|
|
||||||
|
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 (wpa_key_mgmt_sae_ext_key(gWpaSm.key_mgmt)) {
|
if (wpa_key_mgmt_sae_ext_key(gWpaSm.key_mgmt)) {
|
||||||
use_pt = 1;
|
use_pt = 1;
|
||||||
}
|
}
|
||||||
@@ -90,12 +96,6 @@ static esp_err_t wpa3_build_sae_commit(u8 *bssid, size_t *sae_msg_len)
|
|||||||
g_sae_pt = sae_derive_pt(g_allowed_groups, ssid->ssid, ssid->len, pw, strlen((const char *)pw), valid_pwd_id ? sae_pwd_id : NULL);
|
g_sae_pt = sae_derive_pt(g_allowed_groups, ssid->ssid, ssid->len, pw, strlen((const char *)pw), valid_pwd_id ? sae_pwd_id : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
if (g_sae_commit) {
|
||||||
wpabuf_free(g_sae_commit);
|
wpabuf_free(g_sae_commit);
|
||||||
g_sae_commit = NULL;
|
g_sae_commit = NULL;
|
||||||
|
|||||||
@@ -2340,7 +2340,7 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher,
|
|||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
struct wpa_sm *sm = &gWpaSm;
|
struct wpa_sm *sm = &gWpaSm;
|
||||||
bool use_pmk_cache = !esp_wifi_skip_supp_pmkcaching();
|
bool use_pmk_cache = esp_wifi_use_supp_pmk_cache();
|
||||||
u8 assoc_rsnxe[20];
|
u8 assoc_rsnxe[20];
|
||||||
size_t assoc_rsnxe_len = sizeof(assoc_rsnxe);
|
size_t assoc_rsnxe_len = sizeof(assoc_rsnxe);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user