From: Ben Greear Date: Fri, 3 Apr 2015 23:34:33 +0000 (-0400) Subject: Fix INTERFACE_ADD parsing X-Git-Tag: hostap_2_5~869 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da3db6812d56e7ba11e0cf301e38568099f12884;p=thirdparty%2Fhostap.git Fix INTERFACE_ADD parsing This fixes a regression caused by commit efa232f9159e33e18ed624906b0093e11ddcf78e ('Add support for virtual interface creation/deletion') for the case where an empty extra argument is included. Signed-off-by: Ben Greear --- diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 377b9ed16..d48ac8a88 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -8593,10 +8593,17 @@ 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, + "INTERFACE_ADD unsupported extra parameter: '%s'", + extra); return -1; + } } while (0); if (create_iface) {