]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Clear p2p_in_provisioning flag on group removal
authorVivek Natarajan <nataraja@qca.qualcomm.com>
Mon, 11 Mar 2013 18:47:24 +0000 (20:47 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 11 Mar 2013 18:47:24 +0000 (20:47 +0200)
Commit 77dfafd07d3a0335e250b8ffaf74fe7b3714b0bc cancels group formation
timeout on group removal case but failed to reset the
p2p_in_provisioning flag. This can lead to repeated p2p_find failures if
the group gets removed before completion of the WPS provisioning step
(e.g., GO tears down the group). Fix this by clearing
p2p_pin_provisioning when cancelling group formation.

Signed-hostap: Vivek Natarajan <nataraja@qca.qualcomm.com>

wpa_supplicant/p2p_supplicant.c

index 4328c07b7014228544a3e7f408ce5f8e418f014e..6770992b8eddbc4e5185494d4c5906a3c5efbaa7 100644 (file)
@@ -323,9 +323,11 @@ static int wpas_p2p_group_delete(struct wpa_supplicant *wpa_s,
        if (eloop_cancel_timeout(wpas_p2p_group_idle_timeout, wpa_s, NULL) > 0)
                wpa_printf(MSG_DEBUG, "P2P: Cancelled P2P group idle timeout");
        if (eloop_cancel_timeout(wpas_p2p_group_formation_timeout,
-                                wpa_s->parent, NULL) > 0)
+                                wpa_s->parent, NULL) > 0) {
                wpa_printf(MSG_DEBUG, "P2P: Cancelled P2P group formation "
                           "timeout");
+               wpa_s->p2p_in_provisioning = 0;
+       }
 
        if (removal_reason != P2P_GROUP_REMOVAL_SILENT && ssid)
                wpas_notify_p2p_group_removed(wpa_s, ssid, gtype);