[PATCH 9/9] wpa_cli: don't send IFNAME when remote UDP and global iface

Janusz Dziedzic janusz.dziedzic at tieto.com
Wed Sep 23 08:04:19 EDT 2015


In case of global ctrl UDP iface don't send IFNAME command.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic at tieto.com>
---
 src/common/wpa_ctrl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/common/wpa_ctrl.c b/src/common/wpa_ctrl.c
index ad0dcb8..34c4052 100644
--- a/src/common/wpa_ctrl.c
+++ b/src/common/wpa_ctrl.c
@@ -357,7 +357,9 @@ struct wpa_ctrl * wpa_ctrl_open(const char *ctrl_path)
 		ctrl->cookie = os_strdup(buf);
 	}
 
-	if (wpa_ctrl_request(ctrl, "IFNAME", 6, buf, &len, NULL) == 0) {
+	if (port_id > WPA_CTRL_IFACE_PORT) {
+		ctrl->remote_ifname = os_strdup("global");
+	} else if (wpa_ctrl_request(ctrl, "IFNAME", 6, buf, &len, NULL) == 0) {
 		buf[len] = '\0';
 		ctrl->remote_ifname = os_strdup(buf);
 	}
-- 
1.9.1



More information about the HostAP mailing list