]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
SAE: Ignore commit message when waiting for confirm in STA mode
authorJouni Malinen <j@w1.fi>
Sun, 27 Oct 2019 12:35:04 +0000 (14:35 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 27 Oct 2019 12:35:04 +0000 (14:35 +0200)
Previously, an unexpected SAE commit message resulted in forcing
disconnection. While that allowed recovery by starting from scratch,
this is not really necessary. Ignore such unexpected SAE commit message
instead and allow SAE confirm message to be processed after this. This
is somewhat more robust way of handling the cases where SAE commit
message might be retransmitted either in STA->AP or AP->STA direction.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/sme.c

index c8a5d4b8506a19cecb0ddefd6c41bdaee3f3c156..cfb5bb33da41f14065d8471b3b9061d2d327d9c5 100644 (file)
@@ -1242,8 +1242,11 @@ static int sme_sae_auth(struct wpa_supplicant *wpa_s, u16 auth_transaction,
                if ((!external && wpa_s->current_bss == NULL) ||
                    wpa_s->current_ssid == NULL)
                        return -1;
-               if (wpa_s->sme.sae.state != SAE_COMMITTED)
-                       return -1;
+               if (wpa_s->sme.sae.state != SAE_COMMITTED) {
+                       wpa_printf(MSG_DEBUG,
+                                  "SAE: Ignore commit message while waiting for confirm");
+                       return 0;
+               }
                if (groups && groups[0] <= 0)
                        groups = NULL;
                res = sae_parse_commit(&wpa_s->sme.sae, data, len, NULL, NULL,