From a8412ec9d0ec3d5a01c32d817e07762c88913e83 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 12 Oct 2015 14:24:06 +0300 Subject: [PATCH] Clear own_disconnect_req on new connection attempt It was possible for wpa_s->own_disconnect_req to be left set to 1 from a disconnection attempt from a prior connection. This could then prevent proper connection failure processing with the new connection in wpas_connection_failed(). This was triggered by the following hwsim test case sequence: wpas_mesh_secure sae_no_ffc_by_default. In this sequence, the SAE failure due to unsupported group did not result in proper wpas_connection_failed() processing and retry. Fix this by clearing wpa_s->own_disconnect_req in wpa_supplicant_associate() before starting a new connection. Signed-off-by: Jouni Malinen --- wpa_supplicant/wpa_supplicant.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 940092769..f5d73862f 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1586,6 +1586,8 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s, struct wpa_connect_work *cwork; int rand_style; + wpa_s->own_disconnect_req = 0; + if (ssid->mac_addr == -1) rand_style = wpa_s->conf->mac_addr; else