P2P: Reject p2p_find when in provisioning
authorSunil Dutt Undekari <duttus@codeaurora.org>
Mon, 25 Jun 2012 11:05:49 +0000 (14:05 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 25 Jun 2012 11:05:49 +0000 (14:05 +0300)
A p2p_find during provisioning shall not allow the enrollee to
pick the network, hence disable p2p_find during provisioning.

Signed-hostap: Sunil Dutt Undekari <duttus@codeaurora.org>

wpa_supplicant/p2p_supplicant.c

index ec13f02..9e3961c 100644 (file)
@@ -3885,7 +3885,8 @@ int wpas_p2p_find(struct wpa_supplicant *wpa_s, unsigned int timeout,
        if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_MGMT)
                return wpa_drv_p2p_find(wpa_s, timeout, type);
 
-       if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL)
+       if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL ||
+           wpa_s->p2p_in_provisioning)
                return -1;
 
        wpa_supplicant_cancel_sched_scan(wpa_s);