]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Use correct interface type when creating P2P interface
authorAvrahams Stern <avraham.stern@intel.com>
Tue, 18 Oct 2016 09:44:17 +0000 (12:44 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 28 Oct 2016 21:55:49 +0000 (00:55 +0300)
When starting ASP provisioning with connection capability set to NEW,
don't create the pending P2P interface as a GO interface because
Go negotiation will determine which side will be the GO and it is
possible that eventually this interface will become the client.
In this case, when the P2P client is started it will start scanning
and do other station specific operations while the interface type
is AP.

Instead, use type WPA_IF_P2P_GROUP when creating the interface which
means the interface type will be determined later.

Signed-off-by: Avrahams Stern <avraham.stern@intel.com>
wpa_supplicant/p2p_supplicant.c

index 648c840d80915aea243dc1f6673937dc1a66bd19..6465e2f727e93b5470d1b94b2b80951ba6979745 100644 (file)
@@ -807,7 +807,7 @@ grp_owner:
                                              wpa_s->own_addr);
                } else if (!s && !go_wpa_s) {
                        if (wpas_p2p_add_group_interface(wpa_s,
-                                                        WPA_IF_P2P_GO) < 0) {
+                                                        WPA_IF_P2P_GROUP) < 0) {
                                wpa_printf(MSG_ERROR,
                                           "P2P: Failed to allocate a new interface for the group");
                                return P2PS_SETUP_NONE;