From patchwork Thu Nov 24 12:45:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1708718 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) 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=Wn1C1zP5; 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=Uu2t4xhZ; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NHyrp4mfxz23mg for ; Fri, 25 Nov 2022 00:04:58 +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=gXuBcMSp/lF5S7Awr1YjhUK6FD+a+iFBaYXC1x82IXA=; b=Wn1C1zP59Dw26Q Wrkt5vZ01Fljg+FgKNPKz2v36dDS2GUrfjJosOrHETKoviAka7hmAEXPnKVcrVR9+rw/gxTFxGbA5 OYVoSEikfoc6CpfVP7tX7aL7NrH26matcuJ47kPviOup3tGxqLXv0LWFEh7cf+gWbBhX6q4Hcoaso ZKyrsgUEwkVKigCnT+pQZe7pzMvCgGvAIvgG6VF1SX9LGB09PWEn5eBFKs3kmNuDkxjT4LyYyd9eR 3xmhx8Ym32uCFOaPKQGPtBawt87L+OwL5efK8G5Zc7G8nxjLD347crVjlyp9Ip+bHL1GjmmfoLgPL Uoniha/VKQB4zt+WgoXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyBtf-008aOE-Mj; Thu, 24 Nov 2022 13:04:08 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oyBcC-008Rin-4e for hostap@lists.infradead.org; Thu, 24 Nov 2022 12:46:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669293964; x=1700829964; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HoLa6ItEaR/WK3ka5LMv8rdJ3s2bVeB79uPFS+TxcIg=; b=Uu2t4xhZ0JvcsC+y8ysI4XlkikEx4GQ80d4GVTPuSMZ/hRhV+pXPrJOj kuUjewatST/jjIWY8xHPEsvw/05qoLkk9Kmg1Ww69Rgd+ggd1tN8zAO2K SjzdXvUjkdp9i7vfepfbwQyzeqB57XlHkBXPT2FkfpkY2TCYwsKGSSh/y pQTLF6Qu0kL7gCGPINNvrvs8Ip96xtT6AfcNKrkSReSWYa4msWIL4i9CG 3mlK9wlNJew3TPHlJUpIIjl1GVAJAnCNAVqIMqIsADOvXCI8VHUJHE5KL mdbxcy40J5rJMQjXSqTe4MgIyd5LzkTcCGW54zDQCtINIGvgIt9N9hZqu g==; X-IronPort-AV: E=McAfee;i="6500,9779,10540"; a="341185871" X-IronPort-AV: E=Sophos;i="5.96,190,1665471600"; d="scan'208";a="341185871" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2022 04:46:03 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10540"; a="675083140" X-IronPort-AV: E=Sophos;i="5.96,190,1665471600"; d="scan'208";a="675083140" Received: from aotchere-desk.jer.intel.com ([10.13.16.84]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2022 04:46:02 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH 11/13] nl80211: Handle scan results with MLD connection Date: Thu, 24 Nov 2022 14:45:31 +0200 Message-Id: <20221124124533.54965-12-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221124124533.54965-1-andrei.otcheretianski@intel.com> References: <20221124124533.54965-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-20221124_044604_308357_FB886AB8 X-CRM114-Status: GOOD ( 12.90 ) X-Spam-Score: -5.4 (-----) 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: Ilan Peer With an MLD connection the BSSID reported in the association event is the MLD AP address, while the association state reported in the scan results relates to the MLD AP specific link. In such a case d [...] Content analysis details: (-5.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [192.55.52.88 listed in wl.mailspike.net] -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [192.55.52.88 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.0 RCVD_IN_MSPIKE_WL Mailspike good senders -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: Ilan Peer With an MLD connection the BSSID reported in the association event is the MLD AP address, while the association state reported in the scan results relates to the MLD AP specific link. In such a case do not disconnect. Signed-off-by: Ilan Peer --- src/drivers/driver_nl80211_scan.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c index d54dd3a33e..4b0a5c720b 100644 --- a/src/drivers/driver_nl80211_scan.c +++ b/src/drivers/driver_nl80211_scan.c @@ -911,8 +911,21 @@ static void nl80211_check_bss_status(struct wpa_driver_nl80211_data *drv, "nl80211: Local state (associated with " MACSTR ") does not match with BSS state", MAC2STR(drv->bssid)); - clear_state_mismatch(drv, r->bssid); - clear_state_mismatch(drv, drv->bssid); + + if (os_memcmp(drv->sta_mlo_info.ap_mld_addr, drv->bssid, + ETH_ALEN)) { + clear_state_mismatch(drv, r->bssid); + + if (!is_zero_ether_addr(drv->sta_mlo_info.ap_mld_addr)) + clear_state_mismatch(drv, + drv->sta_mlo_info.ap_mld_addr); + else + clear_state_mismatch(drv, drv->bssid); + + } else { + wpa_printf(MSG_DEBUG, + "nl80211: BSSID is the MLD address"); + } } }