From patchwork Tue Jun 10 18:19:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilan Peer X-Patchwork-Id: 358190 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]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BC5A7140085 for ; Wed, 11 Jun 2014 05:16:22 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 430369D1DC; Tue, 10 Jun 2014 15:16:06 -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 Ck+-1kVqhcRj; Tue, 10 Jun 2014 15:16:06 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id D3CF117C00B; Tue, 10 Jun 2014 15:15:11 -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 6724417C01E for ; Tue, 10 Jun 2014 15:15:10 -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 HybqjtZ7vym1 for ; Tue, 10 Jun 2014 15:15:03 -0400 (EDT) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 1C97F17C00A for ; Tue, 10 Jun 2014 15:14:55 -0400 (EDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 10 Jun 2014 12:14:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="4.98,1010,1392192000"; d="scan'208"; a="545862282" Received: from unknown (HELO ipeer-e6430-1.jer.intel.com) ([10.12.217.176]) by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2014 12:14:53 -0700 From: Ilan Peer To: hostap@lists.shmoo.com Subject: [PATCH 5/7] TDLS: add ctrl_iface option for flushing all TDLS peers Date: Tue, 10 Jun 2014 21:19:08 +0300 Message-Id: <1402424350-19261-5-git-send-email-ilan.peer@intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1402424350-19261-1-git-send-email-ilan.peer@intel.com> References: <1402424350-19261-1-git-send-email-ilan.peer@intel.com> Cc: Arik Nemtsov , Arik Nemtsov 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: Arik Nemtsov Useful for debugging purposes. Signed-off-by: Arik Nemtsov --- wpa_supplicant/ctrl_iface.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 53e23ff..143d18c 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -584,6 +584,19 @@ static int wpa_supplicant_ctrl_iface_tdls_teardown( u8 peer[ETH_ALEN]; int ret; + if (!addr) { + wpa_printf(MSG_DEBUG, + "CTRL_IFACE TDLS_TEARDOWN: invalid address"); + return -1; + } + + /* remove everyone */ + if (!os_strcmp(addr, "*")) { + wpa_printf(MSG_DEBUG, "CTRL_IFACE TDLS_TEARDOWN *"); + wpa_tdls_teardown_peers(wpa_s->wpa); + return 0; + } + if (hwaddr_aton(addr, peer)) { wpa_printf(MSG_DEBUG, "CTRL_IFACE TDLS_TEARDOWN: invalid " "address '%s'", addr);