[PATCH 3/3] tests: MLD association with links missing from the ML probe response

Louis Kotze loukot at gmail.com
Sat Aug 22 15:40:43 PDT 2026


Verify that the links for which the AP MLD does not provide the
requested per-STA profiles in the multi-link probe response are
discovered with a separate scan of the channel of each of them, instead
of the association proceeding without those links. Also verify that the
Probe Request frame of each such scan is addressed to the affiliated AP
of the link and does not include a Probe Request Multi-Link element.

Signed-off-by: Louis Kotze <loukot at gmail.com>
---
 tests/hwsim/test_eht.py | 58 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/tests/hwsim/test_eht.py b/tests/hwsim/test_eht.py
index 4ad464ddb..69c0a58c2 100644
--- a/tests/hwsim/test_eht.py
+++ b/tests/hwsim/test_eht.py
@@ -1106,6 +1106,64 @@ def test_eht_mld_reconnect_stale_links(dev, apdev, params):
         traffic_test(wpas, hapd0)
         traffic_test(wpas, hapd1)
 
+def test_eht_mld_probe_no_sta_profiles(dev, apdev, params):
+    """MLD client scans a link that the AP MLD omits from the ML probe response"""
+    with HWSimRadio(use_mlo=True) as (hapd_radio, hapd_iface), \
+        HWSimRadio(use_mlo=True) as (wpas_radio, wpas_iface):
+
+        wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+        wpas.interface_add(wpas_iface)
+        check_sae_capab(wpas)
+
+        ssid = "mld_ap"
+        passphrase = 'qwertyuiop'
+        link_params = eht_mld_ap_wpa2_params(ssid, passphrase, mfp="2",
+                                             key_mgmt="SAE", pwe='2')
+        # Emulate an AP MLD that does not include the requested per-STA
+        # profiles in the ML probe response, so that the second link can be
+        # discovered only by scanning the channel of that link.
+        link_params['no_ml_probe_sta_profiles'] = '1'
+        link_params['channel'] = '1'
+        link_params['bssid'] = '00:11:22:33:44:01'
+        hapd0 = eht_mld_enable_ap(hapd_iface, 0, link_params)
+
+        link_params['channel'] = '6'
+        link_params['bssid'] = '00:11:22:33:44:02'
+        hapd1 = eht_mld_enable_ap(hapd_iface, 1, link_params)
+
+        link_params['channel'] = '11'
+        link_params['bssid'] = '00:11:22:33:44:03'
+        hapd2 = eht_mld_enable_ap(hapd_iface, 2, link_params)
+
+        wpas.set("sae_pwe", "1")
+        # Scan only the channel of the first link so that the other links are
+        # not in the BSS table before the connection attempt.
+        wpas.connect(ssid, sae_password=passphrase, ieee80211w="2",
+                     key_mgmt="SAE", scan_freq="2412")
+        eht_verify_status(wpas, hapd0, 2412, 20, is_ht=True, mld=True,
+                          valid_links=7, active_links=7)
+
+        # The missing link has to be scanned with a Probe Request frame that is
+        # addressed to the affiliated AP of that link.
+        for bssid in ['00:11:22:33:44:02', '00:11:22:33:44:03']:
+            out = run_tshark(os.path.join(params['logdir'], 'hwsim0.pcapng'),
+                             'wlan.fc.type_subtype == 0x0004 && wlan.bssid == ' + bssid,
+                             display=['frame.number'])
+            if not out.splitlines():
+                raise Exception('Probe Request frame for missing link ' + bssid + ' not found')
+
+        # That Probe Request frame is not a multi-link probe request, so it does
+        # not include a Multi-Link element.
+        out = run_tshark(os.path.join(params['logdir'], 'hwsim0.pcapng'),
+                         'wlan.fc.type_subtype == 0x0004 && wlan.ext_tag.number == 107 && (wlan.bssid == 00:11:22:33:44:02 || wlan.bssid == 00:11:22:33:44:03)',
+                         display=['frame.number'])
+        if out.splitlines():
+            raise Exception('Unexpected Multi-Link element in the Probe Request frame for a missing link')
+
+        traffic_test(wpas, hapd0)
+        traffic_test(wpas, hapd1)
+        traffic_test(wpas, hapd2)
+
 def test_eht_tx_link_rejected_connect_other(dev, apdev, params):
     """EHT MLD AP with MLD client being rejected on TX link, but then connecting on second link"""
     with HWSimRadio(use_mlo=True) as (hapd_radio, hapd_iface), \
-- 
2.55.0




More information about the Hostap mailing list