[PATCH] tests: Add test that fails the MLD association after hostapd success
Benjamin Berg
benjamin at sipsolutions.net
Thu Oct 30 12:15:12 PDT 2025
On Thu, 2025-10-30 at 18:56 +0100, Benjamin Berg wrote:
> From: Benjamin Berg <benjamin.berg at intel.com>
>
> This test checks the flow where an error happens on the first
> association attempt but everything looks fine from the perspective of
> the AP. In this case, the AP will receive a second authentication even
> though it thinks the client is already associated.
>
> Currently this test triggers a segfault in hostapd.
>
> Signed-off-by: Benjamin Berg <benjamin.berg at intel.com>
> ---
> src/drivers/driver_nl80211_event.c | 4 ++++
> tests/hwsim/test_eht.py | 33 ++++++++++++++++++++++++++++++
> 2 files changed, 37 insertions(+)
>
> [SNIP]
> +
> + link_params['channel'] = '6'
> + link_params['bssid'] = '00:11:22:33:44:02'
> + hapd1 = eht_mld_enable_ap(hapd_iface, 1, link_params)
> +
> + wpas.set("sae_pwe", "2")
> + with fail_test(wpas, 1, "denied-unspec:mlme_event_assoc"):
Ah, I changed that to be more specific in the last minute and didn't
notice that it broke the test. The function name cannot be matched
there (I expect it is inlined). That said, the tag is there, so one can
just specify only "denied-unspec" to trigger the bug.
Benjamin
> + wpas.connect(ssid, sae_password=passphrase, ieee80211w="2",
> + key_mgmt="SAE", scan_freq="2412")
> +
> + # connection succeeds on the second attempt which uses an open
> + # authentication
> + eht_verify_status(wpas, hapd1, 2437, 20, is_ht=True, mld=True,
> + valid_links=3, active_links=3)
> + traffic_test(wpas, hapd0)
> + traffic_test(wpas, hapd1)
> +
> def test_eht_non_assoc_links_rejected(dev, apdev, params):
> """EHT MLD AP with all non assoc links rejected in association"""
> with HWSimRadio(use_mlo=True) as (hapd_radio, hapd_iface), \
More information about the Hostap
mailing list