diff mbox

wpa_supplicant: fix interface-add wpa-cli command.

Message ID 1428104073-25575-1-git-send-email-greearb@candelatech.com
State Accepted
Headers show

Commit Message

Ben Greear April 3, 2015, 11:34 p.m. UTC
From: Ben Greear <greearb@candelatech.com>

This fixes a regression caused by:

commit efa232f9159e33e18ed624906b0093e11ddcf78e
Author: Jithu Jance <jithu@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@candelatech.com>
---
 wpa_supplicant/ctrl_iface.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Jouni Malinen April 4, 2015, 8:28 a.m. UTC | #1
On Fri, Apr 03, 2015 at 07:34:33PM -0400, greearb@candelatech.com wrote:
> This fixes a regression caused by:
>     Add support for virtual interface creation/deletion

Thanks, applied.
diff mbox

Patch

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) {