From patchwork Wed Jan 8 09:10:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Berg X-Patchwork-Id: 2031268 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=gqwyxzmU; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=sipsolutions.net header.i=@sipsolutions.net header.a=rsa-sha256 header.s=mail header.b=HQJ+3zM3; 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 4YSj3D1zW5z1yPD for ; Wed, 8 Jan 2025 20:16:40 +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=Tgs5IHts8+SBfN4cJOvgSr2+g16P1H6oZXBUyTpqs1E=; b=gqwyxzmUn3sgwj saRcoXeoTw0uP/GrU0Fpjes5OCX9kUt7O5kEuUze0KNeoFUl8KpJ3sD++qYbOBoCKGXH5UX6xkqty d+pO/0TnQHzfzZQywPL0njN9s3Ev1d7RlNWDRsD5+F/ojiK4WnCrD4sk+PZr4U5pIvR89U1uuoKzy iskUEtgBbsz+dcGMHZ5Da/aIPpG++57LBQ6NjFIUcbBVOvVMrQqr6UebSeOs8ZXDOoO/DnDSD7IKi ZzfjEjYFmnMSXe9VeUzMvcpv94g1yqwb4x8mNUduYSMLSFZkW2p8lIhwKQEsj/pDAbBTHlrXV1I58 vMFQUs0kt9DD4RHXEb6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tVSAk-00000007ilY-3bxb; Wed, 08 Jan 2025 09:16:18 +0000 Received: from s3.sipsolutions.net ([2a01:4f8:242:246e::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tVS7O-00000007i2a-36LU for hostap@lists.infradead.org; Wed, 08 Jan 2025 09:12:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=uns6zWd1HC2edg+u6Q0bItgEeECRfyH6BU5yzoWWRwU=; t=1736327570; x=1737537170; b=HQJ+3zM3QlbjKX1xel3+KG3PoE78caw8Q2XTB40xHXYdmh8 8J/bUyxKsKnZ7j96GVb/rekjN/+xnISoQTQE/5/tedVWqcERiGlbhqrRyTuJwU92te/oNxys+LQXS tBXxUgEK0pyPNX0WKe/+v0fb3r1Np/3vmN4/xk5GsirWuGi2L70VHLQOnn5HcptnocPMVj5fmBzD7 bGlBc9L3WoAUhUV41fiYH6p/wxioebZu/oRjcJumUhdzH6pN8fXLoBpbbBCiEo6ThFhXwTHeMt+eW hmK0/AZFfd4qKZXl3Dh0D8bvR6uMgggZ06dcWGcXi6uT91dtFtgzjVwxxOsJaEQg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.98) (envelope-from ) id 1tVS7M-00000008ALf-38kf; Wed, 08 Jan 2025 10:12:49 +0100 From: Benjamin Berg To: hostap@lists.infradead.org Cc: Benjamin Berg , Andrei Otcheretianski Subject: [PATCH 5/5] tests: pass extra_selectors to nl80211 driver Date: Wed, 8 Jan 2025 10:10:33 +0100 Message-ID: <20250108091033.358853-6-benjamin@sipsolutions.net> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250108091033.358853-1-benjamin@sipsolutions.net> References: <20250108091033.358853-1-benjamin@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250108_011250_952236_88D5EEC2 X-CRM114-Status: GOOD ( 10.72 ) X-Spam-Score: -2.1 (--) 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 mac80211 will start checking whether the selectors present in the supported rates set are supported by the location station. Add the appropriate options so that the check is bypassed when implemented [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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_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 -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 mac80211 will start checking whether the selectors present in the supported rates set are supported by the location station. Add the appropriate options so that the check is bypassed when implemented on newer kernels. Signed-off-by: Benjamin Berg Reviewed-by: Andrei Otcheretianski --- tests/hwsim/test_ap_ht.py | 22 ++++++++++++++-------- tests/hwsim/test_ap_vht.py | 11 +++++++---- tests/hwsim/test_he.py | 21 ++++++++++++--------- tests/hwsim/test_owe.py | 14 ++++++++------ 4 files changed, 41 insertions(+), 27 deletions(-) diff --git a/tests/hwsim/test_ap_ht.py b/tests/hwsim/test_ap_ht.py index 4ae02234e0..2e69b1b155 100644 --- a/tests/hwsim/test_ap_ht.py +++ b/tests/hwsim/test_ap_ht.py @@ -871,11 +871,14 @@ def test_ap_require_ht(dev, apdev): "require_ht": "1"} hapd = hostapd.add_ap(apdev[0], params) - dev[1].connect("require-ht", key_mgmt="NONE", scan_freq="2412", - disable_ht="1", wait_connect=False) + wpas_force = WpaSupplicant(global_iface='/tmp/wpas-wlan5') + wpas_force.interface_add("wlan5", drv_params="extra_selectors=127") + + wpas_force.connect("require-ht", key_mgmt="NONE", scan_freq="2412", + disable_ht="1", wait_connect=False) dev[0].connect("require-ht", key_mgmt="NONE", scan_freq="2412") - ev = dev[1].wait_event(["CTRL-EVENT-ASSOC-REJECT"]) - dev[1].request("DISCONNECT") + ev = wpas_force.wait_event(["CTRL-EVENT-ASSOC-REJECT"]) + wpas_force.request("DISCONNECT") if ev is None: raise Exception("Association rejection timed out") if "status_code=27" not in ev: @@ -912,11 +915,14 @@ def test_ap_require_ht_limited_rates(dev, apdev): "require_ht": "1"} hapd = hostapd.add_ap(apdev[0], params) - dev[1].connect("require-ht", key_mgmt="NONE", scan_freq="2412", - disable_ht="1", wait_connect=False) + wpas_force = WpaSupplicant(global_iface='/tmp/wpas-wlan5') + wpas_force.interface_add("wlan5", drv_params="extra_selectors=127") + + wpas_force.connect("require-ht", key_mgmt="NONE", scan_freq="2412", + disable_ht="1", wait_connect=False) dev[0].connect("require-ht", key_mgmt="NONE", scan_freq="2412") - ev = dev[1].wait_event(["CTRL-EVENT-ASSOC-REJECT"]) - dev[1].request("DISCONNECT") + ev = wpas_force.wait_event(["CTRL-EVENT-ASSOC-REJECT"]) + wpas_force.request("DISCONNECT") if ev is None: raise Exception("Association rejection timed out") if "status_code=27" not in ev: diff --git a/tests/hwsim/test_ap_vht.py b/tests/hwsim/test_ap_vht.py index 5ba0227e76..010db1b83b 100644 --- a/tests/hwsim/test_ap_vht.py +++ b/tests/hwsim/test_ap_vht.py @@ -211,17 +211,20 @@ def test_ap_vht80_params(dev, apdev): "require_vht": "1"} hapd = hostapd.add_ap(apdev[0], params) - dev[1].connect("vht", key_mgmt="NONE", scan_freq="5180", - disable_vht="1", wait_connect=False) + wpas_force = WpaSupplicant(global_iface='/tmp/wpas-wlan5') + wpas_force.interface_add("wlan5", drv_params="extra_selectors=126") + + wpas_force.connect("vht", key_mgmt="NONE", scan_freq="5180", + disable_vht="1", wait_connect=False) dev[0].connect("vht", key_mgmt="NONE", scan_freq="5180") dev[2].connect("vht", key_mgmt="NONE", scan_freq="5180", disable_sgi="1") - ev = dev[1].wait_event(["CTRL-EVENT-ASSOC-REJECT"]) + ev = wpas_force.wait_event(["CTRL-EVENT-ASSOC-REJECT"]) if ev is None: raise Exception("Association rejection timed out") if "status_code=104" not in ev: raise Exception("Unexpected rejection status code") - dev[1].request("DISCONNECT") + wpas_force.request("DISCONNECT") hwsim_utils.test_connectivity(dev[0], hapd) sta0 = hapd.get_sta(dev[0].own_addr()) sta2 = hapd.get_sta(dev[2].own_addr()) diff --git a/tests/hwsim/test_he.py b/tests/hwsim/test_he.py index 917313feeb..f58ec8f96d 100644 --- a/tests/hwsim/test_he.py +++ b/tests/hwsim/test_he.py @@ -327,21 +327,24 @@ def test_he80_params(dev, apdev): "he_rts_threshold":"1"} hapd = hostapd.add_ap(apdev[0], params) - dev[1].connect("he", key_mgmt="NONE", scan_freq="5180", - disable_vht="1", wait_connect=False) + wpas_force = WpaSupplicant(global_iface='/tmp/wpas-wlan5') + wpas_force.interface_add("wlan5", drv_params="extra_selectors=126,122") + + wpas_force.connect("he", key_mgmt="NONE", scan_freq="5180", + disable_vht="1", wait_connect=False) dev[0].connect("he", key_mgmt="NONE", scan_freq="5180") dev[2].connect("he", key_mgmt="NONE", scan_freq="5180", disable_sgi="1") - ev = dev[1].wait_event(["CTRL-EVENT-ASSOC-REJECT"]) + ev = wpas_force.wait_event(["CTRL-EVENT-ASSOC-REJECT"]) if ev is None: raise Exception("Association rejection timed out") if "status_code=104" not in ev: raise Exception("Unexpected rejection status code") - dev[1].request("DISCONNECT") - dev[1].request("REMOVE_NETWORK all") - dev[1].dump_monitor() - dev[1].connect("he", key_mgmt="NONE", scan_freq="5180", - disable_he="1", wait_connect=False) + wpas_force.request("DISCONNECT") + wpas_force.request("REMOVE_NETWORK all") + wpas_force.dump_monitor() + wpas_force.connect("he", key_mgmt="NONE", scan_freq="5180", + disable_he="1", wait_connect=False) hwsim_utils.test_connectivity(dev[0], hapd) sta0 = hapd.get_sta(dev[0].own_addr()) sta2 = hapd.get_sta(dev[2].own_addr()) @@ -351,7 +354,7 @@ def test_he80_params(dev, apdev): raise Exception("dev[0] did not support SGI") if capab2 & 0x60 != 0: raise Exception("dev[2] claimed support for SGI") - ev = dev[1].wait_event(["CTRL-EVENT-ASSOC-REJECT"]) + ev = wpas_force.wait_event(["CTRL-EVENT-ASSOC-REJECT"]) if ev is None: raise Exception("Association rejection timed out (2)") if "status_code=124" not in ev: diff --git a/tests/hwsim/test_owe.py b/tests/hwsim/test_owe.py index 98254e54b5..c4ab7fbdec 100644 --- a/tests/hwsim/test_owe.py +++ b/tests/hwsim/test_owe.py @@ -749,11 +749,13 @@ def test_owe_assoc_reject(dev, apdev): bssid = hapd.own_addr() # First, reject two associations with HT-required (i.e., not OWE related) - dev[0].scan_for_bss(bssid, freq="2412") - dev[0].connect("owe", key_mgmt="OWE", ieee80211w="2", - disable_ht="1", scan_freq="2412", wait_connect=False) + wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5') + wpas.interface_add("wlan5", drv_params="extra_selectors=127") + wpas.scan_for_bss(bssid, freq="2412") + wpas.connect("owe", key_mgmt="OWE", ieee80211w="2", + disable_ht="1", scan_freq="2412", wait_connect=False) for i in range(0, 2): - ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT"], timeout=10) + ev = wpas.wait_event(["CTRL-EVENT-ASSOC-REJECT"], timeout=10) if ev is None: raise Exception("Association rejection not reported") @@ -761,8 +763,8 @@ def test_owe_assoc_reject(dev, apdev): # attempt instead of having moved to testing another group. hapd.set("require_ht", "0") for i in range(0, 2): - ev = dev[0].wait_event(["CTRL-EVENT-ASSOC-REJECT", - "CTRL-EVENT-CONNECTED"], timeout=10) + ev = wpas.wait_event(["CTRL-EVENT-ASSOC-REJECT", + "CTRL-EVENT-CONNECTED"], timeout=10) if ev is None: raise Exception("Association result not reported") if "CTRL-EVENT-CONNECTED" in ev: