fix(wifi): Fix encryption/decryption issue for mgmt packets

* Fix issues related to mgmt packets encryption in GCMP
* Fix issue of wrong decryption of mgmt packets when PMF is enabled
* Fix softAP bug in handling of SAE Reauthentication
This commit is contained in:
Kapil Gupta
2024-03-28 15:16:49 +05:30
committed by Sarvesh Bodakhe
parent 2ba5320112
commit 280ec09b03
8 changed files with 16 additions and 11 deletions

View File

@@ -338,7 +338,7 @@ struct hostapd_config {
char country[3]; /* first two octets: country code as described in
* ISO/IEC 3166-1. Third octet:
* ' ' (ascii 32): all environments
* 'O': Outdoor environemnt only
* 'O': Outdoor environment only
* 'I': Indoor environment only
*/
@@ -384,7 +384,7 @@ int hostapd_setup_wpa_psk(struct hostapd_bss_config *conf);
struct sta_info;
bool wpa_ap_join(struct sta_info *sta, uint8_t *bssid, uint8_t *wpa_ie,
uint8_t wpa_ie_len,uint8_t *rsnxe, uint8_t rsnxe_len,
bool *pmf_enable, int subtype);
bool *pmf_enable, int subtype, uint8_t *pairwise_cipher);
bool wpa_ap_remove(u8* bssid);
#endif /* HOSTAPD_CONFIG_H */

View File

@@ -2560,7 +2560,7 @@ void wpa_deinit(struct wpa_authenticator *wpa_auth)
#ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT
bool wpa_ap_join(struct sta_info *sta, uint8_t *bssid, uint8_t *wpa_ie,
uint8_t wpa_ie_len, uint8_t *rsnxe, uint8_t rsnxe_len,
bool *pmf_enable, int subtype)
bool *pmf_enable, int subtype, uint8_t *pairwise_cipher)
{
struct hostapd_data *hapd = (struct hostapd_data*)esp_wifi_get_hostap_private_internal();
enum wpa_validate_result status_code = WPA_IE_OK;
@@ -2611,6 +2611,7 @@ send_resp:
//Check whether AP uses Management Frame Protection for this connection
*pmf_enable = wpa_auth_uses_mfp(sta->wpa_sm);
*pairwise_cipher = GET_BIT_POSITION(sta->wpa_sm->pairwise);
}
wpa_auth_sta_associated(hapd->wpa_auth, sta->wpa_sm);