From: Jouni Malinen Date: Mon, 12 Oct 2015 11:24:06 +0000 (+0300) Subject: Clear own_disconnect_req on new connection attempt X-Git-Tag: hostap_2_6~1526 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8412ec9d0ec3d5a01c32d817e07762c88913e83;p=thirdparty%2Fhostap.git 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 --- 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