]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Clear own_disconnect_req on new connection attempt
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 12 Oct 2015 11:24:06 +0000 (14:24 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 12 Oct 2015 11:24:06 +0000 (14:24 +0300)
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 <jouni@qca.qualcomm.com>
wpa_supplicant/wpa_supplicant.c

index 94009276907138396b21dd1d895ef08c113db83d..f5d73862f6762c7902cdc285f011e15193b0e8ca 100644 (file)
@@ -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