From patchwork Thu Aug 1 16:51:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aditya Kumar Singh X-Patchwork-Id: 1967931 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=NG9456kt; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=MHSXkQ//; 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 4WZZlD3M5Nz1ydq for ; Fri, 2 Aug 2024 02:52:40 +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=pSdIMh0OMU44apVwj6nEPXtkvdQG8GPjsKPH6z1SBuk=; b=NG9456ktynRqEn ci2OTu3LTMF7h4A2R07lAK26IGLXL0LWT+ZFtdEH/FOspkhXTNHTjN2nThX4Vd1QMIbQUp/z+juzS LLdCJKLB8dSNiiW3vXp+k2aAfvrZP9Msgmgnoai50afwsnnpdoM7sC41Kz/ZQnLpzXw0wUDTURXJ8 n29LpcTg7D+YKJLr1J+BiPAz7+exAPt3fI6gMfh+bZZ12eFsidlJ4TQ75ZhkrP8/ezcsp06YlSGlz gTxOdi5devLx3ij9g9mcA07+63Dyx79jc0SAAWVXWgOuF6tHwbH20CwQQp8u5R1NHgdg1u/FN+H/v o+lhwhgkPC4Gi+8IR0AQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZZ2K-00000006Amu-2cuy; Thu, 01 Aug 2024 16:52:20 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZZ2E-00000006Ahq-0Jyq for hostap@lists.infradead.org; Thu, 01 Aug 2024 16:52:17 +0000 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 471DatsE026309 for ; Thu, 1 Aug 2024 16:52:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= hEK6yKmPvvbSvJiSj3d05KPnlRw78a3QT+GQu4147G8=; b=MHSXkQ//vtGyu6XJ 6+cKwgL2IWb6oT1pXgPhU3+NMO9v5B4wffto+pBk/46kJIJNJp1+uunp/iVCp+cO 36B2UBA0LNbwm35NhQH6NuDGLEwBQVVpx9PbdPRRyeCw08JhEBFfHyuDhzQ/A7U2 fZr5XflqQg2mr0SzWK9eP8JpNZTk6gT0pSIswRW32iTWZh02AzVPZqVxiJtQ1IYA sPlkSRcN4QB/2NHlZoI3Qf6x23YIQHAP2Wm88JMPeAxGeOyTEjWReY+tv0sqZnzb Tr1nFKQDyqlpNYwF2X5BnJkbaz8nSb6+B3MUN5tgDjgyWLNjGqM5vZaYqhWinGKj 42+nPA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 40r7uh19ny-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 01 Aug 2024 16:52:13 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 471GqCJE015061 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 1 Aug 2024 16:52:12 GMT Received: from hu-adisi-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Thu, 1 Aug 2024 09:52:10 -0700 From: Aditya Kumar Singh To: CC: Aditya Kumar Singh Subject: [PATCH v3 5/6] tests: MLO: use link ID to access control sockets Date: Thu, 1 Aug 2024 22:21:42 +0530 Message-ID: <20240801165143.3212598-6-quic_adisi@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801165143.3212598-1-quic_adisi@quicinc.com> References: <20240801165143.3212598-1-quic_adisi@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: yRm1KrQkfBJTW--U-LeoUBeKJzg36AqM X-Proofpoint-ORIG-GUID: yRm1KrQkfBJTW--U-LeoUBeKJzg36AqM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-01_15,2024-08-01_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 suspectscore=0 adultscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2408010111 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240801_095214_306057_98E356C0 X-CRM114-Status: GOOD ( 17.52 ) 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: With MLO, each BSS will create sockets under the given ctrl_iface directory with the socket name being '_link'. Make necessary changes in MLO related test cases so that it can access the new socket and proceed further as expected. Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [205.220.180.131 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [205.220.180.131 listed in bl.score.senderscore.com] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [205.220.180.131 listed in sa-accredit.habeas.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 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.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 -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 With MLO, each BSS will create sockets under the given ctrl_iface directory with the socket name being '_link'. Make necessary changes in MLO related test cases so that it can access the new socket and proceed further as expected. Signed-off-by: Aditya Kumar Singh --- tests/hwsim/hostapd.py | 27 +++++++--- tests/hwsim/test_eht.py | 92 +++++++++++++++++++++++++++----- tests/hwsim/test_rsn_override.py | 2 + 3 files changed, 101 insertions(+), 20 deletions(-) diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py index ebb2e328af50..4fa19294a99e 100644 --- a/tests/hwsim/hostapd.py +++ b/tests/hwsim/hostapd.py @@ -147,14 +147,20 @@ class HostapdGlobal: class Hostapd: def __init__(self, ifname, bssidx=0, hostname=None, ctrl=hapd_ctrl, - port=8877): + port=8877, link=None): self.hostname = hostname self.host = remotehost.Host(hostname, ifname) self.ifname = ifname if hostname is None: - self.ctrl = wpaspy.Ctrl(os.path.join(ctrl, ifname)) - self.mon = wpaspy.Ctrl(os.path.join(ctrl, ifname)) - self.dbg = ifname + if link is None: + self.ctrl = wpaspy.Ctrl(os.path.join(ctrl, ifname)) + self.mon = wpaspy.Ctrl(os.path.join(ctrl, ifname)) + self.dbg = ifname + else: + ifname = ifname + "_link" + link + self.ctrl = wpaspy.Ctrl(os.path.join(ctrl, ifname)) + self.mon = wpaspy.Ctrl(os.path.join(ctrl, ifname)) + self.dbg = ifname else: self.ctrl = wpaspy.Ctrl(hostname, port) self.mon = wpaspy.Ctrl(hostname, port) @@ -740,6 +746,13 @@ def add_mld_link(apdev, params): hostname = None port = 8878 + if "link_id" not in params: + raise Exception("Link ID not passed in param") + + link_id = params["link_id"] + # Delete the 'link_id' key from params or else it will be added in config + del params["link_id"] + hapd_global = HostapdGlobal(apdev) confname, ctrl_iface = cfg_mld_link_file(ifname, params) hapd_global.send_file(confname, confname) @@ -749,7 +762,8 @@ def add_mld_link(apdev, params): if str(e) == "Could not add hostapd link": raise utils.HwsimSkip("No MLO support in hostapd") port = hapd_global.get_ctrl_iface_port(ifname) - hapd = Hostapd(ifname, hostname=hostname, ctrl=ctrl_iface, port=port) + hapd = Hostapd(ifname, hostname=hostname, ctrl=ctrl_iface, port=port, + link=link_id) if not hapd.ping(): raise Exception("Could not ping hostapd") return hapd @@ -1023,9 +1037,6 @@ def cfg_mld_link_file(ifname, params): fd, fname = tempfile.mkstemp(dir='/tmp', prefix=conf + '-') f = os.fdopen(fd, 'w') - if idx != 0: - ctrl_iface="/var/run/hostapd_%d" % idx - f.write("ctrl_interface=%s\n" % ctrl_iface) f.write("driver=nl80211\n") f.write("ieee80211n=1\n") diff --git a/tests/hwsim/test_eht.py b/tests/hwsim/test_eht.py index 00d6adff7190..e9543936477c 100644 --- a/tests/hwsim/test_eht.py +++ b/tests/hwsim/test_eht.py @@ -302,10 +302,12 @@ def test_eht_mld_discovery(dev, apdev): ssid = "mld_ap" link0_params = {"ssid": ssid, "hw_mode": "g", - "channel": "1"} + "channel": "1", + "link_id": "0"} link1_params = {"ssid": ssid, "hw_mode": "g", - "channel": "2"} + "channel": "2", + "link_id": "1"} hapd0 = eht_mld_enable_ap(hapd_iface, link0_params) hapd1 = eht_mld_enable_ap(hapd_iface, link1_params) @@ -387,12 +389,14 @@ def _eht_mld_owe_two_links(dev, apdev, second_link_disabled=False, ssid = "mld_ap_owe_two_link" params = eht_mld_ap_wpa2_params(ssid, key_mgmt="OWE", mfp="2") + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd0_iface, params) params['channel'] = '6' if second_link_disabled: params['mld_indicate_disabled'] = '1' + params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd0_iface, params) # Check legacy client connection @@ -445,6 +449,7 @@ def test_eht_mld_sae_single_link(dev, apdev): ssid = "mld_ap_sae_single_link" params = eht_mld_ap_wpa2_params(ssid, passphrase, key_mgmt="SAE", mfp="2", pwe='2') + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd_iface, params) @@ -470,10 +475,12 @@ def run_eht_mld_sae_two_links(dev, apdev, beacon_prot="1", params = eht_mld_ap_wpa2_params(ssid, passphrase, key_mgmt="SAE", mfp="2", pwe='1', beacon_prot=beacon_prot) + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd_iface, params) params['channel'] = '6' + params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd_iface, params) @@ -560,6 +567,7 @@ def test_eht_mld_sae_ext_one_link(dev, apdev): passphrase = 'qwertyuiop' ssid = "mld_ap_sae_ext_single_link" params = eht_mld_ap_wpa2_params(ssid, passphrase, key_mgmt="SAE-EXT-KEY") + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd_iface, params) @@ -583,10 +591,12 @@ def test_eht_mld_sae_ext_two_links(dev, apdev): ssid = "mld_ap_sae_two_link" params = eht_mld_ap_wpa2_params(ssid, passphrase, key_mgmt="SAE-EXT-KEY") + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd_iface, params) params['channel'] = '6' + params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd_iface, params) @@ -606,10 +616,12 @@ def test_eht_mld_sae_legacy_client(dev, apdev): ssid = "mld_ap_sae_two_link" params = eht_mld_ap_wpa2_params(ssid, passphrase, key_mgmt="SAE", mfp="2", pwe='1') + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd_iface, params) params['channel'] = '6' + params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd_iface, params) @@ -646,10 +658,12 @@ def test_eht_mld_sae_transition(dev, apdev): params = eht_mld_ap_wpa2_params(ssid, passphrase, key_mgmt="SAE-EXT-KEY SAE WPA-PSK WPA-PSK-SHA256", mfp="1") + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd_iface, params) params['channel'] = '6' + params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd_iface, params) @@ -682,10 +696,12 @@ def test_eht_mld_ptk_rekey(dev, apdev): key_mgmt="SAE-EXT-KEY SAE WPA-PSK WPA-PSK-SHA256", mfp="1") params['wpa_ptk_rekey'] = '5' + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd_iface, params) params['channel'] = '6' + params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd_iface, params) @@ -722,10 +738,12 @@ def test_eht_mld_gtk_rekey(dev, apdev): key_mgmt="SAE-EXT-KEY SAE WPA-PSK WPA-PSK-SHA256", mfp="1") params['wpa_group_rekey'] = '5' + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd_iface, params) params['channel'] = '6' + params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd_iface, params) @@ -762,10 +780,12 @@ def test_eht_ml_probe_req(dev, apdev): ssid = "mld_ap_sae_two_link" params = eht_mld_ap_wpa2_params(ssid, passphrase, key_mgmt="SAE-EXT-KEY") + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd_iface, params) params['channel'] = '6' + params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd_iface, params) @@ -804,10 +824,14 @@ def test_eht_mld_connect_probes(dev, apdev, params): key_mgmt="SAE", pwe='2') link_params['channel'] = '1' link_params['bssid'] = '00:11:22:33:44:01' + link_params['link_id'] = '0' + hapd0 = eht_mld_enable_ap(hapd_iface, link_params) link_params['channel'] = '6' link_params['bssid'] = '00:11:22:33:44:02' + link_params['link_id'] = '1' + hapd1 = eht_mld_enable_ap(hapd_iface, link_params) wpas.set("sae_pwe", "1") @@ -849,10 +873,14 @@ def test_eht_tx_link_rejected_connect_other(dev, apdev, params): key_mgmt="SAE", pwe='2') link_params['channel'] = '1' link_params['bssid'] = '00:11:22:33:44:01' + link_params['link_id'] = '0' + hapd0 = eht_mld_enable_ap(hapd_iface, link_params) link_params['channel'] = '6' link_params['bssid'] = '00:11:22:33:44:02' + link_params['link_id'] = '1' + hapd1 = eht_mld_enable_ap(hapd_iface, link_params) wpas.set("sae_pwe", "1") @@ -879,10 +907,14 @@ def test_eht_all_links_rejected(dev, apdev, params): key_mgmt="SAE", pwe='2') link_params['channel'] = '1' link_params['bssid'] = '00:11:22:33:44:01' + link_params['link_id'] = '0' + hapd0 = eht_mld_enable_ap(hapd_iface, link_params) link_params['channel'] = '6' link_params['bssid'] = '00:11:22:33:44:02' + link_params['link_id'] = '1' + hapd1 = eht_mld_enable_ap(hapd_iface, link_params) wpas.set("mld_connect_bssid_pref", "00:11:22:33:44:01") wpas.set("sae_pwe", "1") @@ -922,10 +954,13 @@ def test_eht_connect_invalid_link(dev, apdev, params): key_mgmt="SAE", pwe='2') link_params['channel'] = '1' link_params['bssid'] = '00:11:22:33:44:01' + link_params['link_id'] = '0' + hapd0 = eht_mld_enable_ap(hapd_iface, link_params) link_params['channel'] = '6' link_params['bssid'] = '00:11:22:33:44:02' + link_params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd_iface, link_params) # We scan for both APs, then try to connect to link 0, but only the @@ -957,9 +992,12 @@ def test_eht_mld_link_removal(dev, apdev): ssid = "mld_ap_owe_two_link" params = eht_mld_ap_wpa2_params(ssid, key_mgmt="OWE", mfp="2") + params['link_id'] = '0' + hapd0 = eht_mld_enable_ap(hapd0_iface, params) params['channel'] = '6' + params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd0_iface, params) wpas.connect(ssid, scan_freq="2412 2437", key_mgmt="OWE", @@ -1009,10 +1047,12 @@ def test_eht_mld_bss_trans_mgmt_link_removal_imminent(dev, apdev): params = eht_mld_ap_wpa2_params(ssid, key_mgmt="OWE", mfp="2") params["bss_transition"] = "1" params["mbo"] = "1" + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd0_iface, params) params['channel'] = '6' + params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd0_iface, params) @@ -1061,10 +1101,12 @@ def test_eht_ap_mld_proto(dev, apdev): ssid = "mld_ap_owe_two_link" params = eht_mld_ap_wpa2_params(ssid, key_mgmt="OWE", mfp="2") + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd0_iface, params) params['channel'] = '6' + params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd0_iface, params) @@ -1449,10 +1491,14 @@ def test_eht_mld_gas(dev, apdev): params['venue_group'] = "7" params['venue_type'] = "1" params['venue_name'] = "eng:Example venue" + params['link_id'] = '0' + hapd0 = eht_mld_enable_ap(hapd0_iface, params) bssid0 = hapd0.own_addr() params['channel'] = '6' + params['link_id'] = '1' + hapd1 = eht_mld_enable_ap(hapd0_iface, params) bssid1 = hapd1.own_addr() @@ -1485,9 +1531,13 @@ def test_eht_mld_dpp_responder_while_assoc(dev, apdev): ssid = "owe_two_link" params = eht_mld_ap_wpa2_params(ssid, key_mgmt="OWE", mfp="2") + params['link_id'] = '0' + hapd0 = eht_mld_enable_ap(hapd0_iface, params) params['channel'] = '6' + params['link_id'] = '1' + hapd1 = eht_mld_enable_ap(hapd0_iface, params) wpas.connect(ssid, scan_freq="2412 2437", key_mgmt="OWE", @@ -1513,9 +1563,13 @@ def _eht_mld_disconnect(dev, apdev, disassoc=True): ssid = "mld_ap_owe_two_link" params = eht_mld_ap_wpa2_params(ssid, key_mgmt="OWE", mfp="2") + params['link_id'] = '0' + hapd0 = eht_mld_enable_ap(hapd0_iface, params) params['channel'] = '6' + params['link_id'] = '1' + hapd1 = eht_mld_enable_ap(hapd0_iface, params) wpas.connect(ssid, scan_freq="2412 2437", key_mgmt="OWE", @@ -1570,6 +1624,7 @@ def test_eht_mld_non_pref_chan(dev, apdev): params = eht_mld_ap_wpa2_params(ssid, key_mgmt="OWE", mfp="2") params["bss_transition"] = "1" params["mbo"] = "1" + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd0_iface, params) @@ -1658,6 +1713,7 @@ def test_eht_mld_rrm_beacon_req(dev, apdev): params["bss_transition"] = "1" params["mbo"] = "1" params["rrm_beacon_report"] = "1" + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd0_iface, params) @@ -1673,6 +1729,8 @@ def test_eht_mld_rrm_beacon_req(dev, apdev): other_ssid = "other" params = eht_mld_ap_wpa2_params(other_ssid, key_mgmt="OWE", mfp="2") params["channel"] = '6' + params['link_id'] = '0' + hapd1 = eht_mld_enable_ap(hapd1_iface, params) # Issue a beacon request for the second AP @@ -1712,6 +1770,8 @@ def test_eht_mld_legacy_stas(dev, apdev): mfp="2", pwe='2') params['rsn_pairwise'] = "CCMP GCMP-256" params['sae_groups'] = "19 20" + params['link_id'] = '0' + hapd0 = eht_mld_enable_ap(hapd_iface, params) for i in range(3): @@ -1751,6 +1811,8 @@ def test_eht_mld_and_mlds(dev, apdev): mfp="2", pwe='2') params['rsn_pairwise'] = "CCMP GCMP-256" params['sae_groups'] = "19 20" + params['link_id'] = '0' + hapd0 = eht_mld_enable_ap(hapd_iface, params) wpas.set("sae_pwe", "1") @@ -1816,9 +1878,13 @@ def test_eht_mlo_csa(dev, apdev): params = eht_mld_ap_wpa2_params(ssid, passphrase, key_mgmt="SAE", mfp="2", pwe='1') + params['link_id'] = '0' + hapd0 = eht_mld_enable_ap(hapd_iface, params) params['channel'] = '6' + params['link_id'] = '1' + hapd1 = eht_mld_enable_ap(hapd_iface, params) wpas.set("sae_pwe", "1") @@ -1903,7 +1969,7 @@ def get_config(iface, count, ssid, passphrase, channel, bssid_regex, params['sae_pwe'] = "2" params['group_mgmt_cipher'] = "AES-128-CMAC" params['beacon_prot'] = "1" - params["ctrl_interface"] = "/var/run/hostapd/chan_" + str(channel) + params["ctrl_interface"] = "/var/run/hostapd/" params["bssid"] = bssid_regex % (i + 1) if rnr: @@ -1911,7 +1977,7 @@ def get_config(iface, count, ssid, passphrase, channel, bssid_regex, append_bss_conf_to_file(f, ifname, params, first=(i == 0)) - hapds.append([ifname, params["ctrl_interface"], i]) + hapds.append([ifname, i]) f.close() @@ -1956,15 +2022,15 @@ def get_mld_devs(hapd_iface, count, prefix, rnr=False): start_ap(prefix, fname1 + " " + fname2) - hapd_mld1_link0 = hostapd.Hostapd(ifname=hapds1[0][0], ctrl=hapds1[0][1], - bssidx=hapds1[0][2]) - hapd_mld1_link1 = hostapd.Hostapd(ifname=hapds2[0][0], ctrl=hapds2[0][1], - bssidx=hapds2[0][2]) + hapd_mld1_link0 = hostapd.Hostapd(ifname=hapds1[0][0], bssidx=hapds1[0][1], + link="0") + hapd_mld1_link1 = hostapd.Hostapd(ifname=hapds2[0][0], bssidx=hapds2[0][1], + link="1") - hapd_mld2_link0 = hostapd.Hostapd(ifname=hapds1[1][0], ctrl=hapds1[1][1], - bssidx=hapds1[1][2]) - hapd_mld2_link1 = hostapd.Hostapd(ifname=hapds2[1][0], ctrl=hapds2[1][1], - bssidx=hapds2[1][2]) + hapd_mld2_link0 = hostapd.Hostapd(ifname=hapds1[1][0], bssidx=hapds1[1][1], + link="0") + hapd_mld2_link1 = hostapd.Hostapd(ifname=hapds2[1][0], bssidx=hapds2[1][1], + link="1") if not hapd_mld1_link0.ping(): raise Exception("Could not ping hostapd") @@ -2143,11 +2209,13 @@ def test_eht_mlo_color_change(dev, apdev): params = eht_mld_ap_wpa2_params(ssid, passphrase, key_mgmt="SAE", mfp="2", pwe='1') params['he_bss_color'] = '42' + params['link_id'] = '0' hapd0 = eht_mld_enable_ap(hapd_iface, params) params['channel'] = '6' params['he_bss_color'] = '24' + params['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd_iface, params) diff --git a/tests/hwsim/test_rsn_override.py b/tests/hwsim/test_rsn_override.py index 6733102e7ba4..9ffcad1032d4 100644 --- a/tests/hwsim/test_rsn_override.py +++ b/tests/hwsim/test_rsn_override.py @@ -141,6 +141,7 @@ def run_rsn_override_mld(dev, apdev, mixed): params['sae_groups'] = '19 20' params['sae_require_mfp'] = '1' params['sae_pwe'] = '2' + params['link_id'] = '0' if not mixed: params['rsn_override_key_mgmt'] = 'SAE' params['rsn_override_key_mgmt_2'] = 'SAE-EXT-KEY' @@ -166,6 +167,7 @@ def run_rsn_override_mld(dev, apdev, mixed): hapd0 = eht_mld_enable_ap(hapd_iface, params) params1['channel'] = '6' + params1['link_id'] = '1' hapd1 = eht_mld_enable_ap(hapd_iface, params1) wpas.set("sae_pwe", "1")