[PATCH] wpa_supplicant: fix interface-add wpa-cli command.

greearb at candelatech.com greearb
Fri Apr 3 16:34:33 PDT 2015


From: Ben Greear <greearb at candelatech.com>

This fixes a regression caused by:

commit efa232f9159e33e18ed624906b0093e11ddcf78e
Author: Jithu Jance <jithu at broadcom.com>
Date:   Fri Mar 20 16:09:50 2015 +0530

    Add support for virtual interface creation/deletion

    Extend interface_add and interface_remove commands via an optional
    argument to allow wpa_supplicant to create/delete a new virtual
    interface.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 wpa_supplicant/ctrl_iface.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 8249f65..83580c3 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -8620,10 +8620,16 @@ static int wpa_supplicant_global_iface_add(struct wpa_global *global,
 		pos = os_strchr(pos, '\t');
 		if (pos)
 			*pos++ = '\0';
+		if (!extra[0])
+			break;
+
 		if (os_strcmp(extra, "create") == 0)
 			create_iface = 1;
-		else
+		else {
+			wpa_printf(MSG_DEBUG, "CTRL_IFACE, invalid extra: '%s'",
+				   extra);
 			return -1;
+		}
 	} while (0);
 
 	if (create_iface) {
-- 
1.9.3




More information about the Hostap mailing list