From patchwork Mon Apr 8 13:06:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1920839 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=t2+8AcOt; 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=W6uAoye6; 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 4VCqD12Zmlz1yZW for ; Mon, 8 Apr 2024 23:08:49 +1000 (AEST) 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: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:In-Reply-To:References: List-Owner; bh=ksCM+MTiH9wZkywtxMroSfsI4qinA3FKjvnkdplE0GE=; b=t2+8AcOtbcgBzk tnAwSMpbide1s7dumWYSFjnOv/2aTwZu5hu6U59pWFEnE43rStSo1Jm5vkCKv8WPdnGggOsFyt5cS zkXCq04frZmwGmEw4+BpxMahUhus+aF6mc0Me9TSKqNe9n/Iu/nXmxBVUW6hYcWlxrB4mI21ZWSgZ Fc4GSKOZ4UpDtpOtKP7Ow1ulqYvdo6akZTl4OQxHs22WPt32nSPvl1lJ3p+GKwEKCtgCQqDtERG1D InvSLcz/QvIzG1HVkEOyIgr/tF5jaq/jhWOL1ZumngI+aXEywlSVbQAM9+lptA89wxUg+IRUkVAqc Ub8lJXLQ7j61cB0HJXDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojY-0000000Fdt6-1iDv; Mon, 08 Apr 2024 13:08:24 +0000 Received: from mgamail.intel.com ([198.175.65.14]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojQ-0000000FdrO-0FiC for hostap@lists.infradead.org; Mon, 08 Apr 2024 13:08:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712581696; x=1744117696; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=SskWJWb2Cil3DdmQy6SaJ82CfOWg4BXqvCfG8BYOhbA=; b=W6uAoye6zByMkFWu8OEO/4mKyvCh1ORZtDyAFEd7hBTAOyTf4d4KY/Po 99HErCMFiREJAxSUGeV1S/NZvLGebdPVCiyJnkYKORJtk3p6G+PtRAJOx 5vPHO/Tx50ObTkNRyTQbw0Ronde0yxZ1wZn4XWOibPDiAYD5jDSLyU7ex 1GYUyu3W7h9FXo3tMku4cH9EKoWh2BSutTWi5JLiQ8D8nXF/hNGJhjzaH /bDte2SCvmWE9zBFQkl9kO+YbU/kjH6hAi/KYIhnu4GL9e7DQmhizzpx7 D5LDTwwIUnQPsKFMS61d9WmwkinSNOHe1iRjTvgogbCC+gteFS8hr//fW g==; X-CSE-ConnectionGUID: 4ThrKSFdQn2HqRY4H6SURw== X-CSE-MsgGUID: +R89m9BrSiC+XP/1Eo+1ZQ== X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="11688851" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="11688851" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:12 -0700 X-CSE-ConnectionGUID: ANJbXJW7SAOBaRqwm1UyPA== X-CSE-MsgGUID: XEw3hi2/QMqtXlHCQx0XAA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="50868748" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:11 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH 1/7] tests: Wait after removing a BSS Date: Mon, 8 Apr 2024 16:06:55 +0300 Message-ID: <20240408130701.531194-1-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240408_060816_175660_7B202B32 X-CRM114-Status: UNSURE ( 7.75 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.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 When a BSS is removed, the flow continues without actually waiting for the AP to be stopped. This is racy in flows that actually expect the AP to be stopped, e.g., test_ap_bss_add_remove(). Content analysis details: (-2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [198.175.65.14 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.5 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 When a BSS is removed, the flow continues without actually waiting for the AP to be stopped. This is racy in flows that actually expect the AP to be stopped, e.g., test_ap_bss_add_remove(). Try to mitigate such cases by adding a short sleep after the AP is removed. Signed-off-by: Ilan Peer --- tests/hwsim/hostapd.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py index 007812274b..ebb2e328af 100644 --- a/tests/hwsim/hostapd.py +++ b/tests/hwsim/hostapd.py @@ -766,6 +766,9 @@ def remove_bss(apdev, ifname=None): hapd_global = HostapdGlobal(apdev) hapd_global.remove(ifname) + # wait little to make sure the AP stops beaconing + time.sleep(0.1) + def terminate(apdev): try: hostname = apdev['hostname'] From patchwork Mon Apr 8 13:06:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1920836 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=1NFpxJcF; 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=S8HYwHE9; 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 4VCqCz6Jlbz1yYf for ; Mon, 8 Apr 2024 23:08:47 +1000 (AEST) 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=9l+6pJ2yab5gfUeDpbpdNpgYP9KrGxx0VNRXCLWLMyU=; b=1NFpxJcFHggney Si+cVdMR4sQ7U9B37PxDPpvb34YW7Hm3pehkOST50rt9njF3hV9QFFVlVMbSsw23lXnQ/fAz17+dB wVdvJXIW0PW19xFqC/c8180FXDEOFYDwjYqZAWh4gX27nWY3C8KVClnpC1BGaX3SFj47ZJs+jh3Fi 4bGuIZtPEuM6de9bGeBuTPWvi2cxaGhjm4hPvTE7+YaN+3J0a5vBxpI2IwnfvNwNg6ZFrO/s2fSAK eopIoYSpVmCmc32D9TMiWsueH0nBPiwMWVlW1U07N1UQvmBmYnWN+yxZUgjTIszae9uQ4qR4Www9U fJUzptVn9p8Ak9yra7HQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojV-0000000FdsP-21Fl; Mon, 08 Apr 2024 13:08:21 +0000 Received: from mgamail.intel.com ([198.175.65.14]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojQ-0000000Fdre-1Xie for hostap@lists.infradead.org; Mon, 08 Apr 2024 13:08:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712581696; x=1744117696; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1uBPhokpHG7MjOo/ZplWuYhD0urhVlvPNjAPUv/IHSA=; b=S8HYwHE9txuV/lrnZpKAHotXEPgeFt5ljH/9O7VgR+TIz/IzAOteuEMv xhbLqK+htj+VIcKqpLYp4uYzHaOIwBQgpaNyr3xaLLL4qC1o5drtIjZDK HDli3ghV30X7og8NKmZ74W7xb+7LIA9W9L9lUdsC+9VAuB2YmobTL8EFw R293tVkXifTPzMbbawhK4IDZMuC5DQcHzhbqQdpvn0OBokQEWedi4V77u 67VEm3DgTLbaSjkUHXpd61N/rMVuXm8bFCahMhce2CKp02Vty8vlNzQ+4 8s/DHorH9LjHXJYY8xMFpmlAEvX9CmlH19/NMirOA7i72EtxcYbmVaLAs Q==; X-CSE-ConnectionGUID: 6UUQQRS3TK2i2/hIZtTODA== X-CSE-MsgGUID: nqso6cq7S9iJTIT5+qZHcw== X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="11688859" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="11688859" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:16 -0700 X-CSE-ConnectionGUID: JBgGrEVATg29Ta2uxOPRdw== X-CSE-MsgGUID: UBwPcuA6RbCAzOyi/5ColQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="50868763" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:15 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH 2/7] wpa_supplicant: Do not roam to an associated link Date: Mon, 8 Apr 2024 16:06:56 +0300 Message-ID: <20240408130701.531194-2-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240408130701.531194-1-andrei.otcheretianski@intel.com> References: <20240408130701.531194-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-20240408_060816_470652_B44F6C7B X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.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 When considering to roam to a different BSS and the connection is an MLD connection, do not roam to a BSS which is already included in the MLD connection. Signed-off-by: Ilan Peer --- wpa_supplicant/events.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) Content analysis details: (-2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [198.175.65.14 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.5 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 When considering to roam to a different BSS and the connection is an MLD connection, do not roam to a BSS which is already included in the MLD connection. Signed-off-by: Ilan Peer --- wpa_supplicant/events.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index ca27946384..bfe3d85e8f 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -2167,6 +2167,20 @@ int wpa_supplicant_need_to_roam_within_ess(struct wpa_supplicant *wpa_s, MAC2STR(selected->bssid), selected->freq, selected->level, selected->snr, selected->est_throughput); + if (wpa_s->valid_links) { + u8 i; + + for_each_link(wpa_s->valid_links, i) { + if (ether_addr_equal(wpa_s->links[i].bssid, + selected->bssid)) { + wpa_dbg(wpa_s, MSG_DEBUG, + "MLD: associated to selected BSS link_id=%u", + i); + return 0; + } + } + } + if (wpa_s->current_ssid->bssid_set && ether_addr_equal(selected->bssid, wpa_s->current_ssid->bssid)) { wpa_dbg(wpa_s, MSG_DEBUG, "Allow reassociation - selected BSS " From patchwork Mon Apr 8 13:06:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1920837 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=X7v5Iapf; 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=NMiM4llB; 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 4VCqCz6CNlz1yY8 for ; Mon, 8 Apr 2024 23:08:47 +1000 (AEST) 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=R50tDpJDGOG0mtsDjojZgnJmdOm7rA03iKW25+cowOo=; b=X7v5Iapfjo0hNb gxCZUhbIA7tFLgcNa8OltM7f7tnOiaUse6SBQBclHpGwK5hLJ2L0hE8S3GUnU2Qj04jY4LtTooI91 +5yUepl91K5dr6Th0H+rZos20m8KvRp4fz09KXaDfVgQo9GlUEsnB+mOB9/PLySoEFYdFLsqpdeO0 DFRoebO5Cfi+H/Yjk7DkZla9v0igjLcww4P92zyZT0YKM0T6oDDClLVnv+mk8e5BjSqTbQWfVvE9W 8pU9TC6OC5XGAqE87i7TE1BYCXFEvjj0WJQPsbgPIAD4ppyf5To9rQfe9Y7dzucYswW3fdBUYMs5z IsluCIqX2Nta7yGqYQRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtoja-0000000Fdu7-2ULh; Mon, 08 Apr 2024 13:08:27 +0000 Received: from mgamail.intel.com ([198.175.65.14]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojV-0000000FdsZ-1X0C for hostap@lists.infradead.org; Mon, 08 Apr 2024 13:08:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712581701; x=1744117701; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qePUcdZdEVcL7FBzjdm7KIeEMWQsEIRqdSXSD+ci80A=; b=NMiM4llBnPZYzDlcYYJ9frYFORRCXPeZsfEfHnGE27Pix7x+OShJp33B lTceP6IitYOxeRHfbiJMnSKsaT0HN60Gn78i3mtgjAIBxSiJ+9bUZviyK N15Vl+WC21joEzBwF/BOBh5UyhccSwHI6P9qUK1fc2fVz31h/Z/kKdhTr ix+4Jsv5I3tUPZB2HMMtsT8hNIgvAxy1wjcKfFWQYGtN1AXYeKGhUFy+8 ek2ipL67BpOQKhb1Pqcrzso7iNCVQt/zOOMQ2uIAK+ZpCUx4yzTCQSf73 zpOi/UM/RCo7Z6zUdQ2hPso9a+DlxUgFgACP7Jj9pWYhXgwIj5HWYEKAM Q==; X-CSE-ConnectionGUID: CH0Vz7PZRGeczKxpj8GJQg== X-CSE-MsgGUID: OCFANPYrRAGJvqR9DR8axg== X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="11688871" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="11688871" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:21 -0700 X-CSE-ConnectionGUID: rTiiHeBYS2C2n8jMn600XA== X-CSE-MsgGUID: lGP38LINRdqqLRD+R9B2Cw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="50868781" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:20 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH 3/7] SME: MLD: Deauthenticate when failing to parse ML element Date: Mon, 8 Apr 2024 16:06:57 +0300 Message-ID: <20240408130701.531194-3-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240408130701.531194-1-andrei.otcheretianski@intel.com> References: <20240408130701.531194-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-20240408_060821_535408_8434CFF8 X-CRM114-Status: UNSURE ( 8.45 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.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 If parsing the basic ML element in the authenticate frame is failed, instead of only disassociating, completely deauthenticate so all state machines would be in a consistent state. Content analysis details: (-2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [198.175.65.14 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.5 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 If parsing the basic ML element in the authenticate frame is failed, instead of only disassociating, completely deauthenticate so all state machines would be in a consistent state. Signed-off-by: Ilan Peer --- wpa_supplicant/sme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index f08184f981..0115caf8c5 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -2156,7 +2156,8 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data) MAC2STR(wpa_s->pending_bssid), WLAN_REASON_DEAUTH_LEAVING); wpas_connection_failed(wpa_s, wpa_s->pending_bssid, NULL); - wpa_supplicant_mark_disassoc(wpa_s); + wpa_supplicant_deauthenticate(wpa_s, + WLAN_REASON_DEAUTH_LEAVING); return; } From patchwork Mon Apr 8 13:06:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1920838 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=zqo+cDva; 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=YMch4wzS; 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 4VCqD04Vt0z1yYj for ; Mon, 8 Apr 2024 23:08:48 +1000 (AEST) 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=V9iBbqElZIgWFPX6d/sCybp1lnYIhqcMGBM1+coP7DY=; b=zqo+cDvafELe5K /5NzJa8Mr9iKak/0g9kyOQtZ4YOX7jTXo2rpqDP7frrfo78qNvZucMyW+87bL+X2RBh2rV3Vp2XCQ SUG/JwTZzlJCGj9kQ/TrlJ+x9mjg35tZuVi5EglmM5e0STLxjKhC1PjFLaKRwtgrcZ9NmfP5vUQKm Fh+B4GFdG2A3YPZvIlED3ouVMwfNkIRVfPZbscL9r1U82eZZZXrN1T5vqFN7eTqYtsjnYbQ0bPYBv iBKEDaE4XVmYto6QpErqN9JBiGm8SFWaZcZY9OOQu4vYPfKWfWI8TskBQ9ynppn7AR/nvkLQXyO4q 6//VLvX/+s54TwMp6DgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtoje-0000000Fduz-38Us; Mon, 08 Apr 2024 13:08:30 +0000 Received: from mgamail.intel.com ([198.175.65.14]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojX-0000000FdsZ-1eAP for hostap@lists.infradead.org; Mon, 08 Apr 2024 13:08:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712581703; x=1744117703; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YZ3gRc5doOjiPE4HYROmEVb6UAYimsq92XTOW1iygaM=; b=YMch4wzSqD1nIhDIqme34TN4Xe+Mn18OFKNzQ/Gm2zN+d0yq7qc7DQ1+ Z0lwnnxvZOfInvIWCXerQJW9wI1NQ6krnYSDafEctVW3lVDiDj5eXiMjj SOuz6ppV1/BypjyGMWbH1T/8gwE5ryu3wz4dJ7Rkv1vKAJRvE3FCg9+zb X5U9ViWo2Nvhv7OvIF45wk6dy2u8KnWgo1HXfLMkhj0YzHJy0mu8ua6vd FoQWCrhk2jh+SXCkW3CyWapHavyFI2HR/f5yo6ceBHlBnMNeG0SfkDnWF gT4tbCEL3966UlV7CRODAzrks+yx47skKl/8admZH1o+vXoMiiiWcdCt6 Q==; X-CSE-ConnectionGUID: kFmr2BilTZ+m+bRXKZkCnA== X-CSE-MsgGUID: aSoafplYT+CKP+YAQFNv1w== X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="11688875" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="11688875" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:23 -0700 X-CSE-ConnectionGUID: NfR/dGgnQhWJRHeWXeujxg== X-CSE-MsgGUID: azDXEE+vTO2Of5i+dXeecA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="50868791" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:23 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH 4/7] SME: Explicitly deauthenticate on authentication/association timeout Date: Mon, 8 Apr 2024 16:06:58 +0300 Message-ID: <20240408130701.531194-4-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240408130701.531194-1-andrei.otcheretianski@intel.com> References: <20240408130701.531194-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-20240408_060823_703920_8CB63B39 X-CRM114-Status: GOOD ( 10.58 ) X-Spam-Score: -2.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 This would clear the local driver state and also the AP state, and would allow clean connection establishment next time. This is needed in cases where the AP sends the association response frame and sets the station state to associated, but the underlying driver, e.g., mac80211, fails to parse the association response a [...] Content analysis details: (-2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [198.175.65.14 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.5 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 This would clear the local driver state and also the AP state, and would allow clean connection establishment next time. This is needed in cases where the AP sends the association response frame and sets the station state to associated, but the underlying driver, e.g., mac80211, fails to parse the association response and drops it, eventually clearing the association flow and sending a timeout event to user space. Signed-off-by: Ilan Peer --- wpa_supplicant/sme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 0115caf8c5..775fe9ea03 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -2887,7 +2887,7 @@ void sme_event_auth_timed_out(struct wpa_supplicant *wpa_s, { wpa_dbg(wpa_s, MSG_DEBUG, "SME: Authentication timed out"); wpas_connection_failed(wpa_s, wpa_s->pending_bssid, NULL); - wpa_supplicant_mark_disassoc(wpa_s); + wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING); } @@ -2896,7 +2896,7 @@ void sme_event_assoc_timed_out(struct wpa_supplicant *wpa_s, { wpa_dbg(wpa_s, MSG_DEBUG, "SME: Association timed out"); wpas_connection_failed(wpa_s, wpa_s->pending_bssid, NULL); - wpa_supplicant_mark_disassoc(wpa_s); + wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING); } From patchwork Mon Apr 8 13:06:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1920840 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=VeCjVgCT; 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=OAp5c9eT; 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 4VCqD45LBTz1yY8 for ; Mon, 8 Apr 2024 23:08:52 +1000 (AEST) 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=iNqoroufMRtk4APvZqS3SP3dFO5rzhmYzsCIiDfHjzI=; b=VeCjVgCTBYy0oW t3O5REKzCCOkcnJfEQFuWG2snuW/UoWOAlXYdfw7Us2aVCEcJjAlgN20uu3iaM7oVbGR7KQaldRJq dlAj5+8527pHyftz4sZvm/tx/jfOQLpWaHlvupoaIQKa5jRI8zXWnxtjgd1TEqyLYuD7s3HmzKQu4 vDw73QDvGIOQRJhdkngAsrrIkxN4ztGBbaXF4VJD7Jc2bWyOgBl0yFD0E+1wFmcMjjowRnMrU6bcZ w9ol/kpWT0GPKobDG47Wo1ZhHK1WnjWXiaCSRTlIxgBepPRkvIHvVDxI85tlToqsB+VjQopvuKTKI 3Gpqt9GKj1Tj1G8UYZEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojh-0000000FdwJ-0Gtc; Mon, 08 Apr 2024 13:08:33 +0000 Received: from mgamail.intel.com ([198.175.65.14]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojZ-0000000Fdti-2pPY for hostap@lists.infradead.org; Mon, 08 Apr 2024 13:08:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712581705; x=1744117705; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BLXl/o04Jv4WN6pp+IkFBVyyUDJlHSC3r0OQGnsRVJY=; b=OAp5c9eTw4qohgPnjyPpKNr5JWJ7ALFqSmu4VpUZ8KJB+AE2afMtBXxa 0BH8C5aGiB21emrL+RaU8Up9Ig+Od212GRDvEDa8mplw1jbmHKcy+fqRK CoIXcnVw5XM5Ill+V396g8tUdoh7+sHH+3egcVBYHNAFmBnBAgyOGh4jq gTQYzFznIEIq+iE1/kPUIVdPJD++FDLHg97hwJjfFNn5/BhBhbFPNh7Bp e3Rft76XAbqhzdqcrSGeibof4XcD4+wUfKz75BtntpbTKNWPFSm6EYG3x S4rC8be0rHxTPk8F8LMViEKQrMteSyDUQitnOvKyQqKYyJq5kJKR6gtcF Q==; X-CSE-ConnectionGUID: tcNajoIOTKaak1X/ZGS3+Q== X-CSE-MsgGUID: HwWw25/ES9+kcxVvv5tuVw== X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="11688889" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="11688889" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:25 -0700 X-CSE-ConnectionGUID: 4Dr1hJ+5Rr+TBYZ3fQarhw== X-CSE-MsgGUID: BAeIcfEjSnqHljozbG+hxw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="50868804" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:25 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH 5/7] SME: MLD: Use AP MLD address with deauthenticate Date: Mon, 8 Apr 2024 16:06:59 +0300 Message-ID: <20240408130701.531194-5-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240408130701.531194-1-andrei.otcheretianski@intel.com> References: <20240408130701.531194-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-20240408_060826_074176_420EDA10 X-CRM114-Status: GOOD ( 10.21 ) X-Spam-Score: -2.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 When the authentication is an MLD authentication need to use the AP MLD address when requesting the driver to deauthenticate. In addition, in case of failure handling an authentication frame from the AP MLD, clear the MLD state only after the deauthentication is done. Content analysis details: (-2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [198.175.65.14 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.5 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 When the authentication is an MLD authentication need to use the AP MLD address when requesting the driver to deauthenticate. In addition, in case of failure handling an authentication frame from the AP MLD, clear the MLD state only after the deauthentication is done. Signed-off-by: Ilan Peer --- wpa_supplicant/sme.c | 5 +++-- wpa_supplicant/wpa_supplicant.c | 13 ++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 775fe9ea03..5766cdbf4e 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -508,8 +508,6 @@ static int wpas_sme_ml_auth(struct wpa_supplicant *wpa_s, return 0; out: - wpa_printf(MSG_DEBUG, "MLD: Authentication - clearing MLD state"); - wpas_reset_mlo_info(wpa_s); return -1; } @@ -2158,6 +2156,9 @@ void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data) wpas_connection_failed(wpa_s, wpa_s->pending_bssid, NULL); wpa_supplicant_deauthenticate(wpa_s, WLAN_REASON_DEAUTH_LEAVING); + wpa_printf(MSG_DEBUG, + "MLD: Authentication - clearing MLD state"); + wpas_reset_mlo_info(wpa_s); return; } diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index ab71e2f273..54501b7636 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -4588,9 +4588,16 @@ void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s, reason_code, reason2str(reason_code), wpa_supplicant_state_txt(wpa_s->wpa_state)); - if (!is_zero_ether_addr(wpa_s->pending_bssid) && - (wpa_s->wpa_state == WPA_AUTHENTICATING || - wpa_s->wpa_state == WPA_ASSOCIATING)) + wpa_dbg(wpa_s, MSG_DEBUG, + "deauthenticate: valid_links=0x%x, ap_mld_addr=" MACSTR, + wpa_s->valid_links, MAC2STR(wpa_s->ap_mld_addr)); + + if (wpa_s->valid_links && + !is_zero_ether_addr(wpa_s->ap_mld_addr)) + addr = wpa_s->ap_mld_addr; + else if (!is_zero_ether_addr(wpa_s->pending_bssid) && + (wpa_s->wpa_state == WPA_AUTHENTICATING || + wpa_s->wpa_state == WPA_ASSOCIATING)) addr = wpa_s->pending_bssid; else if (!is_zero_ether_addr(wpa_s->bssid)) addr = wpa_s->bssid; From patchwork Mon Apr 8 13:07:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1920841 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=aYIN20Jq; 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=FCXrn0X8; 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 4VCqD523S7z1yYf for ; Mon, 8 Apr 2024 23:08:53 +1000 (AEST) 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=THFckPpifSgRCALzthtJHtt7ecaozBEh0/VGUAfz5jY=; b=aYIN20Jq0Z4wsR ZCV7byrvqRS4+9xmd5VY/8Wxqr3Txone6u3BMHmE1ZLBmBu/M3b1Lyn9pE9zBlg6VsVswz7gAJcCy 5PNtsGCWZIqRWBF4Q2N+OJ++05mzOPUaGIT05nigaKp+3Y0QwUXinxEal/yXwM35Nz0aXTis4SQKz s0r78ZCNzoJF0cTvowkxPmd6yxEOmz+ufgVJsQiGTMJI7O7vgE71ftJ26JkDhZFUIUqSbrawqcJ3K h06L6Itto+WUUHqqlgQ/eQKOAlUt0pwyFFHTVq4bX+FOINc4ljr0aW8Ag7gMNq4kOkV7ixjnkbMV4 JrO350HbEzbrJGCE/Cgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojk-0000000FdxX-2Wnw; Mon, 08 Apr 2024 13:08:36 +0000 Received: from mgamail.intel.com ([198.175.65.14]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojb-0000000FduP-3N4s for hostap@lists.infradead.org; Mon, 08 Apr 2024 13:08:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712581707; x=1744117707; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nx34M8SAT8WU7np2ZSz9GF02m332sMHMnymd5xYqlQ8=; b=FCXrn0X8wxiSZFUM70T3WG1tGyHCPGy94fiemOeB+PtGGM/I/jRjtsmj dRl9BbhD8nAYUx7xKMvZJb0HkbY957cIThZOJbw0rfxO67Bqw8/ckA0Hh dytk49ryTjAxadPMFywqJfKGJKFaeTBStaGF/4PHkmjlzhBCFrymJicBL SH6Yz9jsMUbAEw8XXThSpG3sIzHOUu4fI6GPC+UjtHDiU2r4cvichdAPW a63AOlNr5t+WGa098JOzTMDNFMrN3Fklc4de1IwIjDyeOSr0DrrbC3Xst 0ON5D4A2RXzA9IdR5VoLjV5zkzwwlj/IC91sppPoG5rW/tcp7d0DaUfFb g==; X-CSE-ConnectionGUID: gCjQZETaSOKI0CSGHl0Cbw== X-CSE-MsgGUID: DgFpDtM2Seagp2jJNjHsLw== X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="11688892" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="11688892" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:27 -0700 X-CSE-ConnectionGUID: JrEJPMacSpCPbkmybYzoJA== X-CSE-MsgGUID: f0TySkSpQ2CiMRsX6HBq0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="50868815" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:27 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Benjamin Berg Subject: [PATCH 6/7] ctrl_iface: allow sending ML probe without AP MLD ID Date: Mon, 8 Apr 2024 16:07:00 +0300 Message-ID: <20240408130701.531194-6-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240408130701.531194-1-andrei.otcheretianski@intel.com> References: <20240408130701.531194-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-20240408_060828_051288_2D951DDC X-CRM114-Status: GOOD ( 12.10 ) X-Spam-Score: -2.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: Benjamin Berg If one sends a probe request to a non-TX BSSID, then no AP MLD ID should be included in the request. Permit mld_id to be -1 so that it is not a required argument and can be left out. Content analysis details: (-2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [198.175.65.14 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.5 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 If one sends a probe request to a non-TX BSSID, then no AP MLD ID should be included in the request. Permit mld_id to be -1 so that it is not a required argument and can be left out. 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 d0fda4cd9e..bc013ad995 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -12118,7 +12118,7 @@ static int wpas_ctrl_ml_probe(struct wpa_supplicant *wpa_s, char *cmd) } } - if (mld_id < 0 || is_zero_ether_addr(bssid)) { + if (is_zero_ether_addr(bssid)) { wpa_printf(MSG_DEBUG, "MLD: Failed parsing ML probe request arguments"); return -1; From patchwork Mon Apr 8 13:07:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1920842 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=X5NAU+fk; 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=VfRhyaj2; 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 4VCqD74VcHz1yY8 for ; Mon, 8 Apr 2024 23:08:55 +1000 (AEST) 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=hzQoR+cyp6eAajju4STfl5QZNQAGKqBJSmlp0C6erFY=; b=X5NAU+fkMwp55V ejrbIrLE468cmJMIcF1lGHQj5CoM2ki7qkPKx9hMD+OLkpHvzGwuaRSKVrhXU2S2kwBz9ohh8x0A+ wEHncrsBewc123VmCKbPmUX30ltcZEU8c1/WkLXCeshw4SGQZ8R+C6BCb2e9jMFWntbnb0ndOY9/0 z8/7LrjMqCfHP8RlEdMsGXacUx8qXercxhhZTXATLZZx8bGLj328EL3ATEhmrguAei922d/T1oA4Q ZkhAwCREkK7FbC9nypNg2om9LwL2/mhd0z8t0gqzJ2rGDmyzqc4ZUlJHWrs6bSPYEyMHNokmCB+pd 3NCEIKd21I1tld32j+wA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtojn-0000000Fdyd-1r0f; Mon, 08 Apr 2024 13:08:39 +0000 Received: from mgamail.intel.com ([198.175.65.14]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtoje-0000000FduP-208j for hostap@lists.infradead.org; Mon, 08 Apr 2024 13:08:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712581710; x=1744117710; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RMKK8TYUr6/x5nnj8n2cjwHPIbi7VbRjNpnFZqyeia4=; b=VfRhyaj2vBlmGvCGTqIO2iLYiDeivXCCD6np/e4W0ozs8WRf2efON4pW GpGrLPGbevaJvcoI3aFj8SoyvNtyb0hMrxdAXYcoOnJ1W6QJG2jrzECHn GA22nEBcxO7oXujGYaSma7kUkzGYC/iLLgMp3tUQjTw2OE+gyFxp/rzwn ta7JwyUBkWZAbsXBXVDsWYWKPTbjLewi863yQCRHUouXMdAmBwrQSqdMs 8PCA8RalIBscbCIvc000091+A9aHqDPhzFrs4RzQM984quQh3BnEpD8RU zA7b8PjKqw8PHWfaa1WYPMNOyvUpQm/o/cfUC1K+YjHMAtIbEAzddPOVk Q==; X-CSE-ConnectionGUID: /sbSZXABS+ilSIOGJ1kxwg== X-CSE-MsgGUID: 3TgphKDhQfyHFU2HxT/x1w== X-IronPort-AV: E=McAfee;i="6600,9927,11038"; a="11688897" X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="11688897" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:30 -0700 X-CSE-ConnectionGUID: 4LTLdjnoSyeq3yH5wrBZLg== X-CSE-MsgGUID: n7UjE8lNRB+uCIJv0JfKvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,186,1708416000"; d="scan'208";a="50868837" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2024 06:08:30 -0700 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Ilan Peer Subject: [PATCH 7/7] wpa_supplicant: Do not allow fast associate before scanning 6 GHz Date: Mon, 8 Apr 2024 16:07:01 +0300 Message-ID: <20240408130701.531194-7-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240408130701.531194-1-andrei.otcheretianski@intel.com> References: <20240408130701.531194-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-20240408_060830_652323_7A50ED08 X-CRM114-Status: GOOD ( 11.14 ) X-Spam-Score: -2.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 In case the channel map was updated to include the 6 GHz but these channels were not scanned yet, do not allow fast associate. Signed-off-by: Ilan Peer --- wpa_supplicant/events.c | 10 ++++++---- wpa_supplicant/scan.c | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) Content analysis details: (-2.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [198.175.65.14 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.5 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 In case the channel map was updated to include the 6 GHz but these channels were not scanned yet, do not allow fast associate. Signed-off-by: Ilan Peer --- wpa_supplicant/events.c | 10 ++++++---- wpa_supplicant/scan.c | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index bfe3d85e8f..96054f264a 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -2852,6 +2852,9 @@ int wpa_supplicant_fast_associate(struct wpa_supplicant *wpa_s) wpa_s->conf->scan_res_valid_for_connect)) { wpa_printf(MSG_DEBUG, "Fast associate: Old scan results"); return -1; + } else if (wpa_s->crossed_6ghz_dom) { + wpa_printf(MSG_DEBUG, "Fast associate: crossed 6 GHz dom"); + return -1; } return wpas_select_network_from_last_scan(wpa_s, 0, 1, false, NULL); @@ -5234,11 +5237,10 @@ void wpa_supplicant_update_channel_list(struct wpa_supplicant *wpa_s, wpa_dbg(ifs, MSG_DEBUG, "Channel list changed - restart sched_scan"); wpas_scan_restart_sched_scan(ifs); - } else if (ifs->scanning && !was_6ghz_enabled && - ifs->is_6ghz_enabled) { - /* Look for APs in the 6 GHz band */ + } else if (!was_6ghz_enabled && ifs->is_6ghz_enabled) { wpa_dbg(ifs, MSG_INFO, - "Channel list changed - trigger 6 GHz-only scan"); + "Channel list changed: 6 GHz are enabled"); + ifs->crossed_6ghz_dom = true; } } diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 2db4d8b910..e591f22507 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -322,6 +322,12 @@ int wpa_supplicant_trigger_scan(struct wpa_supplicant *wpa_s, } wpa_s->last_scan_all_chan = !params->freqs; wpa_s->last_scan_non_coloc_6ghz = params->non_coloc_6ghz; + + if (wpa_s->crossed_6ghz_dom) { + wpa_printf(MSG_DEBUG, "First scan after crossing 6 GHz domain"); + wpa_s->crossed_6ghz_dom = false; + } + if (!ctx || radio_add_work(wpa_s, 0, "scan", next, wpas_trigger_scan_cb, ctx) < 0) {