Merge branch 'bugfix/pmf_softap_coex_issue_v4.0' into 'release/v4.0'

Fix issues related to PMF and WPA2-Enterprise (Backport v4.0)

See merge request espressif/esp-idf!10698
This commit is contained in:
Jiang Jiang Jian 2020-10-13 12:26:21 +08:00
commit 42e380270c
3 changed files with 15 additions and 3 deletions

@ -1 +1 @@
Subproject commit 4bfb6b161dc0cf43187ddb3096efdc7de81fa911
Subproject commit f860ff7f8897d0ffd8a939ef2b3d1c8bc4508ef6

View file

@ -234,5 +234,6 @@ esp_err_t esp_wifi_set_wps_start_flag_internal(bool start);
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);
bool esp_wifi_skip_supp_pmkcaching(void);
#endif /* _ESP_WIFI_DRIVER_H_ */

View file

@ -2119,8 +2119,19 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher,
if (sm->key_mgmt == WPA_KEY_MGMT_SAE ||
(esp_wifi_sta_prof_is_wpa2_internal() &&
esp_wifi_sta_get_prof_authmode_internal() == WPA2_AUTH_ENT)) {
pmksa_cache_set_current(sm, NULL, (const u8*) bssid, 0, 0);
wpa_sm_set_pmk_from_pmksa(sm);
if (!esp_wifi_skip_supp_pmkcaching()) {
pmksa_cache_set_current(sm, NULL, (const u8*) bssid, 0, 0);
wpa_sm_set_pmk_from_pmksa(sm);
} else {
struct rsn_pmksa_cache_entry *entry = NULL;
if (sm->pmksa) {
entry = pmksa_cache_get(sm->pmksa, (const u8 *)bssid, NULL, NULL);
}
if (entry) {
pmksa_cache_flush(sm->pmksa, NULL, entry->pmk, entry->pmk_len);
}
}
}
#ifdef CONFIG_IEEE80211W