mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
fix(wifi): wpa3 softap fix deauth when assoc req recv before sae is finished
This commit is contained in:
Submodule components/esp_wifi/lib updated: ee1f0c4332...fbe999ab68
@@ -321,12 +321,15 @@ static bool hostap_sta_join(void **sta, u8 *bssid, u8 *wpa_ie, u8 wpa_ie_len,u8
|
|||||||
sta_info = ap_sta_add(hapd, bssid);
|
sta_info = ap_sta_add(hapd, bssid);
|
||||||
if (!sta_info) {
|
if (!sta_info) {
|
||||||
wpa_printf(MSG_ERROR, "failed to add station " MACSTR, MAC2STR(bssid));
|
wpa_printf(MSG_ERROR, "failed to add station " MACSTR, MAC2STR(bssid));
|
||||||
return false;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SAE
|
#ifdef CONFIG_SAE
|
||||||
if (sta_info->lock && os_semphr_take(sta_info->lock, 0) != TRUE) {
|
if (sta_info->lock && os_semphr_take(sta_info->lock, 0) != TRUE) {
|
||||||
wpa_printf(MSG_INFO, "Ignore assoc request as softap is busy with sae calculation for station "MACSTR, MAC2STR(bssid));
|
wpa_printf(MSG_INFO, "Ignore assoc request as softap is busy with sae calculation for station "MACSTR, MAC2STR(bssid));
|
||||||
|
if (esp_send_assoc_resp(hapd, sta_info, bssid, WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY, rsnxe ? false : true, subtype) != WLAN_STATUS_SUCCESS) {
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_SAE */
|
#endif /* CONFIG_SAE */
|
||||||
@@ -357,10 +360,7 @@ static bool hostap_sta_join(void **sta, u8 *bssid, u8 *wpa_ie, u8 wpa_ie_len,u8
|
|||||||
}
|
}
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
if (sta_info) {
|
esp_wifi_ap_deauth_internal(bssid, WLAN_REASON_PREV_AUTH_NOT_VALID);
|
||||||
ap_free_sta(hapd, sta_info);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user