From 1b5865a53f201741d1d05bbac953b5a603347441 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 27 Oct 2019 14:35:04 +0200 Subject: [PATCH] SAE: Ignore commit message when waiting for confirm in STA mode 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 --- wpa_supplicant/sme.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index c8a5d4b85..cfb5bb33d 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -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,