mirror of
https://github.com/espressif/esp-idf
synced 2025-03-08 15:49:08 -05:00
fix(esp_wifi): Prevent flushing of FT data mistakenly
This commit is contained in:
parent
4f127f57e2
commit
1ee5551004
@ -178,7 +178,7 @@ static int handle_assoc_frame(u8 *frame, size_t len,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void wpa_sta_clear_ft_auth_ie(void)
|
||||
void wpa_sta_clear_ft_auth_ie(void)
|
||||
{
|
||||
struct wpa_sm *sm = &gWpaSm;
|
||||
wpa_printf(MSG_DEBUG, "Clearing all FT IE parameters and keys");
|
||||
@ -341,8 +341,7 @@ void supplicant_sta_conn_handler(uint8_t *bssid)
|
||||
|
||||
void supplicant_sta_disconn_handler(uint8_t reason_code)
|
||||
{
|
||||
#if defined(CONFIG_IEEE80211KV) || defined(CONFIG_IEEE80211R)
|
||||
struct wpa_sm *sm = &gWpaSm;
|
||||
#if defined(CONFIG_IEEE80211KV)
|
||||
struct wpa_supplicant *wpa_s = &g_wpa_supp;
|
||||
|
||||
#if defined(CONFIG_RRM)
|
||||
@ -358,13 +357,7 @@ void supplicant_sta_disconn_handler(uint8_t reason_code)
|
||||
if (wpa_s->current_bss) {
|
||||
wpa_s->current_bss = NULL;
|
||||
}
|
||||
#if defined(CONFIG_IEEE80211R)
|
||||
if (!sm->cur_pmksa) {
|
||||
/* clear all ft auth related IEs so that next will be open auth */
|
||||
wpa_sta_clear_ft_auth_ie();
|
||||
}
|
||||
#endif
|
||||
#endif /* defined(CONFIG_IEEE80211KV) || defined(CONFIG_IEEE80211R) */
|
||||
#endif /* defined(CONFIG_IEEE80211KV) */
|
||||
}
|
||||
|
||||
#if defined(CONFIG_RRM)
|
||||
|
@ -34,3 +34,4 @@ void esp_set_assoc_ie(uint8_t *bssid, const u8 *ies, size_t ies_len, bool add_md
|
||||
void supplicant_sta_conn_handler(uint8_t* bssid);
|
||||
void supplicant_sta_disconn_handler(uint8_t reason_code);
|
||||
#endif
|
||||
void wpa_sta_clear_ft_auth_ie(void);
|
||||
|
@ -297,6 +297,10 @@ static void wpa_sta_disconnected_cb(uint8_t reason_code)
|
||||
case WIFI_REASON_INVALID_FTE:
|
||||
wpa_sta_clear_curr_pmksa();
|
||||
wpa_sm_notify_disassoc(&gWpaSm);
|
||||
#if defined(CONFIG_IEEE80211R)
|
||||
/* clear all ft auth related IEs so that next will be open auth */
|
||||
wpa_sta_clear_ft_auth_ie();
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
if (g_wpa_pmk_caching_disabled) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user