fix(wifi): Resolve comments for softap fixes

This commit is contained in:
Shreyas Sheth 2024-10-14 14:52:24 +05:30 committed by Kapil Gupta
parent 913999b8c3
commit 29a95d30cc
7 changed files with 29 additions and 10 deletions

@ -1 +1 @@
Subproject commit 06d0eec7103812d932dc36464733399c95d607c5
Subproject commit b15699a76c068ab7d7dc6cbee53eb6d559fe646f

View File

@ -358,7 +358,7 @@ uint8_t wpa_status_to_reason_code(int status)
}
bool hostap_new_assoc_sta(struct sta_info *sta, uint8_t *bssid, uint8_t *wpa_ie,
uint8_t wpa_ie_len, uint8_t *rsnxe, uint8_t rsnxe_len,
uint8_t wpa_ie_len, uint8_t *rsnxe, uint16_t rsnxe_len,
bool *pmf_enable, int subtype, uint8_t *pairwise_cipher, uint8_t *reason)
{
struct hostapd_data *hapd = (struct hostapd_data*)esp_wifi_get_hostap_private_internal();

View File

@ -548,14 +548,15 @@ static void wpa3_process_rx_confirm(wpa3_hostap_auth_event_t *evt)
esp_wifi_ap_get_sta_aid(frm->bssid, &aid);
if (aid == 0) {
esp_wifi_ap_deauth_internal(frm->bssid, ret);
} else {
if (sta && sta->sae_data) {
wpabuf_free(sta->sae_data);
sta->sae_data = NULL;
}
}
}
}
done:
if (sta && sta->sae_data) {
wpabuf_free(sta->sae_data);
sta->sae_data = NULL;
}
os_free(frm);
}

View File

@ -113,10 +113,10 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
os_mutex_delete(sta->lock);
sta->lock = NULL;
}
if (sta->sae_data) {
wpabuf_free(sta->sae_data);
sta->sae_data = NULL;
}
if (sta->sae_data) {
wpabuf_free(sta->sae_data);
sta->sae_data = NULL;
}
#endif /* CONFIG_SAE */
wpa_auth_sta_deinit(sta->wpa_sm);
#ifdef CONFIG_WPS_REGISTRAR

View File

@ -572,6 +572,17 @@ wpa_validate_wpa_ie(struct wpa_authenticator *wpa_auth,
}
}
#ifdef CONFIG_SAE
if (wpa_auth->conf.ieee80211w == MGMT_FRAME_PROTECTION_OPTIONAL &&
wpa_auth->conf.sae_require_mfp &&
wpa_key_mgmt_sae(sm->wpa_key_mgmt) &&
!(data.capabilities & WPA_CAPABILITY_MFPC)) {
wpa_printf(MSG_DEBUG,
"Management frame protection required with SAE, but client did not enable it");
return WPA_MGMT_FRAME_PROTECTION_VIOLATION;
}
#endif /* CONFIG_SAE */
if (wpa_auth->conf.ieee80211w == NO_MGMT_FRAME_PROTECTION ||
!(data.capabilities & WPA_CAPABILITY_MFPC))
sm->mgmt_frame_prot = 0;

View File

@ -5,6 +5,7 @@
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#ifdef ESP_SUPPLICANT
#include "utils/includes.h"
#include "utils/common.h"
@ -1576,3 +1577,5 @@ int wpa_cipher_put_suites(u8 *pos, int ciphers)
return num_suites;
}
#endif // ESP_SUPPLICANT

View File

@ -11,6 +11,7 @@
*
* See README and COPYING for more details.
*/
#ifdef ESP_SUPPLICANT
#include "utils/includes.h"
@ -455,3 +456,6 @@ int wpa_supplicant_parse_ies(const u8 *buf, size_t len,
return ret;
}
#endif // ESP_SUPPLICANT