|
|
@@ -239,9 +239,8 @@ static int wpa3_parse_sae_commit(u8 *buf, u32 len, u16 status)
|
|
|
int ret;
|
|
|
|
|
|
if (g_sae_data.state != SAE_COMMITTED) {
|
|
|
- wpa_printf(MSG_ERROR, "wpa3: failed to parse SAE commit in state(%d)!",
|
|
|
- g_sae_data.state);
|
|
|
- return ESP_FAIL;
|
|
|
+ wpa_printf(MSG_DEBUG, "wpa3: Discarding commit frame received in state %d", g_sae_data.state);
|
|
|
+ return ESP_ERR_WIFI_DISCARD;
|
|
|
}
|
|
|
|
|
|
if (status == WLAN_STATUS_ANTI_CLOGGING_TOKEN_REQ) {
|
|
|
@@ -264,7 +263,10 @@ static int wpa3_parse_sae_commit(u8 *buf, u32 len, u16 status)
|
|
|
|
|
|
ret = sae_parse_commit(&g_sae_data, buf, len, NULL, 0, g_allowed_groups,
|
|
|
(status == WLAN_STATUS_SAE_HASH_TO_ELEMENT || status == WLAN_STATUS_SAE_PK));
|
|
|
- if (ret) {
|
|
|
+ if (ret == SAE_SILENTLY_DISCARD) {
|
|
|
+ wpa_printf(MSG_DEBUG, "wpa3: Discarding commit frame due to reflection attack");
|
|
|
+ return ESP_ERR_WIFI_DISCARD;
|
|
|
+ } else if (ret) {
|
|
|
wpa_printf(MSG_ERROR, "wpa3: could not parse commit(%d)", ret);
|
|
|
return ret;
|
|
|
}
|