From patchwork Mon Sep 5 14:32:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 665856 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sSXKp3tKfz9sC3 for ; Tue, 6 Sep 2016 00:34:06 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bguxx-0007aP-SC; Mon, 05 Sep 2016 14:33:41 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bguxv-0007Uk-Gd for hostap@lists.infradead.org; Mon, 05 Sep 2016 14:33:40 +0000 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP; 05 Sep 2016 07:33:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,286,1470726000"; d="scan'208";a="4899567" Received: from unknown (HELO TEMPHOSTNAME.ger.corp.intel.com) ([10.12.217.205]) by orsmga005.jf.intel.com with ESMTP; 05 Sep 2016 07:33:16 -0700 From: andrei.otcheretianski@intel.com To: hostap@lists.infradead.org Subject: [PATCH 02/18] wpa_supplicant: flush the BSS entries when an interface becomes disabled Date: Mon, 5 Sep 2016 17:32:55 +0300 Message-Id: <1473085991-5073-2-git-send-email-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473085991-5073-1-git-send-email-andrei.otcheretianski@intel.com> References: <1473085991-5073-1-git-send-email-andrei.otcheretianski@intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160905_073339_661369_FFBDC100 X-CRM114-Status: UNSURE ( 6.02 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [192.55.52.120 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [192.55.52.120 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Moshe Benji MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Moshe Benji When an interface becomes disabled (e.g. when RF-kill becomes blocked) we should clear the stored scan results. Fix this by flushing the BSS entries when an interface becomes disabled. Signed-off-by: Moshe Benji --- wpa_supplicant/events.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index ef62d70..ba30780 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -3959,6 +3959,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, wpa_s, WLAN_REASON_DEAUTH_LEAVING, 1); } wpa_supplicant_mark_disassoc(wpa_s); + wpa_bss_flush(wpa_s); radio_remove_works(wpa_s, NULL, 0); wpa_supplicant_set_state(wpa_s, WPA_INTERFACE_DISABLED);