From patchwork Fri Apr 3 23:34:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 458106 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) by ozlabs.org (Postfix) with ESMTP id 648C31400B7 for ; Sat, 4 Apr 2015 10:34:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id EA6D09D3D1; Fri, 3 Apr 2015 19:34:52 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z5vqUypHPowY; Fri, 3 Apr 2015 19:34:52 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id A04949D3CA; Fri, 3 Apr 2015 19:34:45 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 59C9E9D3CC for ; Fri, 3 Apr 2015 19:34:44 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 642HqX7tfika for ; Fri, 3 Apr 2015 19:34:38 -0400 (EDT) Received: from mail2.candelatech.com (mail2.candelatech.com [208.74.158.173]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 5D3469D3C6 for ; Fri, 3 Apr 2015 19:34:38 -0400 (EDT) Received: from localhost.localdomain (unknown [50.251.239.81]) by mail2.candelatech.com (Postfix) with ESMTP id AE9F440C4A7; Fri, 3 Apr 2015 16:34:37 -0700 (PDT) From: greearb@candelatech.com To: hostap@lists.shmoo.com Subject: [PATCH] wpa_supplicant: fix interface-add wpa-cli command. Date: Fri, 3 Apr 2015 19:34:33 -0400 Message-Id: <1428104073-25575-1-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 1.9.3 Cc: j@w1.fi, Ben Greear X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From: Ben Greear This fixes a regression caused by: commit efa232f9159e33e18ed624906b0093e11ddcf78e Author: Jithu Jance 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 --- 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) {