From patchwork Thu Dec 28 13:19:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1880853 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=pRhKIQSH; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=a19K2JSu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T18Jy6p6qz23dn for ; Fri, 29 Dec 2023 00:20:50 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rb5ODUfbgkOET9wH83pK6dZYasCvL/K9iUjYXy6XDu8=; b=pRhKIQSHmEJhil AF6sdZAfHjQ5rEo7pXZRtlLkpJ3f45DHINfchl0bGQ+xgOzd+fuQ1Tb5A2yRmP/D+ew1lP60gJN/Q 5gVX4DSiFg5Zrek8sQRCYVKECTIDR+BzhhM1ISMCHcfc8h2yaFG4KNPJm0kfWixcWZ+KrnV9hvnwl fdzSEWAPRQ+LyRDLdwDAVaJKEX1Sldz5r+sBDFDHL2D7wwO3wdx3uStAUP0QpRwclXljJaAITnFMm dwc5xABI58lviRQDsp/nHQIPjScq1ejNKxut9Fb51YutLq5EM/pidJ40Vj/8FHAzLB711oPspmQfU p+tHGnDm5hHOcvLu/T5w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rIqJ7-00Gv0o-1e; Thu, 28 Dec 2023 13:20:17 +0000 Received: from mgamail.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rIqJ4-00Gv02-3C for hostap@lists.infradead.org; Thu, 28 Dec 2023 13:20:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703769614; x=1735305614; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=U6KDOdsR+FHGx9+KCkP69Sf2YY7JH+nmGsdC0vXPcaE=; b=a19K2JSuQCRSdXGpnalbSfz3a4CJ0c8rIJnGf4i+k1BCjTj82XmZVcbG owSgoUM6JeUJ6AqMOYL7H0Oug1/pigy3ja8yymRT0LMCzTeuCf2DUOCFZ UlNlJHBWnVBRVXAriFLgihKnmMcWssxxEBHsJsWILeZsZMmQa+y4Wiqk7 JWwLVPxfVhZWzYw526Vwwm5DYewG/sBP9uwqCh9fS8kUuSoluDoMPPv+V sCfG1n29au+cNGckXwtDsXiGBzqwwJJX1hjyKCKzJXHvTDaxuurViFrpm kuGArNzD8SOwsMkULi78knQdAsKgJ79QTBCsy4QR1XIrHEBMRjRnM9ZFX w==; X-IronPort-AV: E=McAfee;i="6600,9927,10936"; a="482725600" X-IronPort-AV: E=Sophos;i="6.04,312,1695711600"; d="scan'208";a="482725600" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2023 05:20:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,312,1695711600"; d="scan'208";a="26866252" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2023 05:20:13 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH] wpa_supplicant: Do not invalidate PMKSA cache for bssid_* updates Date: Thu, 28 Dec 2023 15:19:24 +0200 Message-ID: <20231228131924.2443044-4-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231228131924.2443044-1-andrei.otcheretianski@intel.com> References: <20231228131924.2443044-1-andrei.otcheretianski@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231228_052015_042874_E9B402D8 X-CRM114-Status: GOOD ( 10.83 ) X-Spam-Score: -2.7 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Benjamin Berg These updates do not cause the PMKSA cache to become invalid. As such, allow setting any of bssid_hint, bssid_ignore, bssid_accept, bssid_blacklist, bssid_whitelist without clearing the cache and caus [...] Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.43 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Benjamin Berg These updates do not cause the PMKSA cache to become invalid. As such, allow setting any of bssid_hint, bssid_ignore, bssid_accept, bssid_blacklist, bssid_whitelist without clearing the cache and causing the current connection to be dropped immediately. Signed-off-by: Benjamin Berg --- wpa_supplicant/ctrl_iface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index b67b3b305c..15cb52ae17 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -3626,7 +3626,7 @@ static int wpa_supplicant_ctrl_iface_update_network( #endif /* CONFIG_BGSCAN */ if (os_strcmp(name, "bssid") != 0 && - os_strcmp(name, "bssid_hint") != 0 && + os_strncmp(name, "bssid_", 6) != 0 && os_strcmp(name, "scan_freq") != 0 && os_strcmp(name, "priority") != 0) { wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid);