]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE: Reject unexpected Status Code in SAE commit explicitly (AP)
authorJouni Malinen <jouni@codeaurora.org>
Fri, 6 Dec 2019 15:26:57 +0000 (17:26 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 6 Dec 2019 15:26:57 +0000 (17:26 +0200)
Previously, this case was ignored silently in AP mode. While that could
be a reasonable approach for an unexpected condition, it would be fine
to reject this case explicitly as well. This makes it somewhat easier to
test unexpected SAE H2E vs. looping behavior.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/ap/ieee802_11.c

index 07723d0cf4c27fe908ea93bc7f61c3622ac3239e..6a638f09060b41ca041ec9f84b1783bbb2c4781d 100644 (file)
@@ -1122,8 +1122,10 @@ static void handle_auth_sae(struct hostapd_data *hapd, struct sta_info *sta,
        if (!sta->sae) {
                if (auth_transaction != 1 ||
                    !sae_status_success(hapd, status_code)) {
-                       resp = -1;
-                       goto remove_sta;
+                       wpa_printf(MSG_DEBUG, "SAE: Unexpected Status Code %u",
+                                  status_code);
+                       resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
+                       goto reply;
                }
                sta->sae = os_zalloc(sizeof(*sta->sae));
                if (!sta->sae) {