aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface_unix.c
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2015-12-27 14:25:06 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-28 15:21:08 (GMT)
commit1c94570f1b4d12d5fdcfe072b4b2f2042e8268f0 (patch)
treeea30661a1182276fe76eb5ddd2a84e579949ae49 /wpa_supplicant/ctrl_iface_unix.c
parentf98674aa375586993b68a84b65086aaff329372d (diff)
downloadhostap-1c94570f1b4d12d5fdcfe072b4b2f2042e8268f0.zip
hostap-1c94570f1b4d12d5fdcfe072b4b2f2042e8268f0.tar.gz
hostap-1c94570f1b4d12d5fdcfe072b4b2f2042e8268f0.tar.bz2
Do not wait for monitor to attach if no control interface
In case an interface has started without a control interface initialized, skip waiting for monitor to attach at the start of wpa_supplicant (-W). Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface_unix.c')
-rw-r--r--wpa_supplicant/ctrl_iface_unix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c
index 2c71b2d..7b36751 100644
--- a/wpa_supplicant/ctrl_iface_unix.c
+++ b/wpa_supplicant/ctrl_iface_unix.c
@@ -1058,6 +1058,9 @@ void wpa_supplicant_ctrl_iface_wait(struct ctrl_iface_priv *priv)
struct sockaddr_un from;
socklen_t fromlen = sizeof(from);
+ if (priv->sock == -1)
+ return;
+
for (;;) {
wpa_printf(MSG_DEBUG, "CTRL_IFACE - %s - wait for monitor to "
"attach", priv->wpa_s->ifname);