mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-15 16:34:05 +00:00
fix(esp_wifi): Flush PMK when EAP config is changed
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
bool g_wpa_pmk_caching_disabled = 0;
|
||||
const wifi_osi_funcs_t *wifi_funcs;
|
||||
struct wpa_funcs *wpa_cb;
|
||||
bool g_wpa_config_changed;
|
||||
|
||||
void wpa_install_key(enum wpa_alg alg, u8 *addr, int key_idx, int set_tx,
|
||||
u8 *seq, size_t seq_len, u8 *key, size_t key_len, enum key_flag key_flag)
|
||||
@@ -229,11 +230,22 @@ int dpp_connect(uint8_t *bssid, bool pdr_done)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void wpa_config_reload(void)
|
||||
{
|
||||
struct wpa_sm *sm = &gWpaSm;
|
||||
wpa_sm_pmksa_cache_flush(sm, NULL);
|
||||
}
|
||||
|
||||
int wpa_sta_connect(uint8_t *bssid)
|
||||
{
|
||||
/* use this API to set AP specific IEs during connection */
|
||||
int ret = 0;
|
||||
ret = wpa_config_profile(bssid);
|
||||
|
||||
if (g_wpa_config_changed) {
|
||||
wpa_config_reload();
|
||||
g_wpa_config_changed = false;
|
||||
}
|
||||
if (ret == 0) {
|
||||
ret = wpa_config_bss(bssid);
|
||||
if (ret) {
|
||||
@@ -447,12 +459,6 @@ fail:
|
||||
}
|
||||
#endif
|
||||
|
||||
static void wpa_config_reload(void)
|
||||
{
|
||||
struct wpa_sm *sm = &gWpaSm;
|
||||
wpa_sm_pmksa_cache_flush(sm, NULL);
|
||||
}
|
||||
|
||||
int esp_supplicant_init(void)
|
||||
{
|
||||
int ret = ESP_OK;
|
||||
|
Reference in New Issue
Block a user