aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-03-01 09:23:09 (GMT)
committerJouni Malinen <j@w1.fi>2015-03-01 09:23:09 (GMT)
commit44b9ea5bb2e22311c33fb4981598683df243175b (patch)
tree8fb99add415e6781f5f57a627e76d99d0289a491 /wpa_supplicant/events.c
parent6d0b4474643c22229b1548042c2624e877f73e3c (diff)
downloadhostap-44b9ea5bb2e22311c33fb4981598683df243175b.zip
hostap-44b9ea5bb2e22311c33fb4981598683df243175b.tar.gz
hostap-44b9ea5bb2e22311c33fb4981598683df243175b.tar.bz2
P2P: Do not allow scan or normal association on cfg80211 P2P Device
The dedicated P2P management instance (wpas->p2p_mgmt == 1) using cfg80211 P2P Device cannot be used for non-P2P uses or connection (there is no netdev). Reject or ignore such operations to avoid unexpected operations if enabled network blocks are configured in the wpa_supplicant instance used to control this interface. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index f76fe97..1f9fc97 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -1421,6 +1421,9 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
struct wpa_bss *selected;
struct wpa_ssid *ssid = NULL;
+ if (wpa_s->p2p_mgmt)
+ return 0; /* no normal connection on p2p_mgmt interface */
+
selected = wpa_supplicant_pick_network(wpa_s, &ssid);
if (selected) {