[PATCH 0/6] hostapd: handle nl80211 no_sta flag in mgmt frames

Benjamin Berg benjamin at sipsolutions.net
Sun Nov 22 09:13:03 PST 2026


Hi,

I did not look at it that closely initially, and thought that it should
probably be fine.

But, now I am wondering if this code is really handling all the corner
cases that you mentioned in your e-mail from 2026-02-09 ("Re: [PATCH v2
2/3] AP: Always re-add stations that use MLO").

The cases 1-5,7 should be fine, but I am not sure about the other ones.

For example case 6:
> 6. Initial connection: 2‑link MLD STA (L1, L2, M). Second connection:
> another 2‑link MLD STA using (L1, L2, M1).

In this case, address translation will have happened. However, I
believe that handle_auth will correctly extract the MLD address from
the auth frame and then create a new station entry.

Reading the code, it will then:
 1. Use M (i.e. the old MLD address) as the link address.
 2. It'll then call ap_sta_re_add, which might even succeed
    (though would fail if the link address was correct).
 3. Then, I suspect it will send the frame to M currently

In this case, the new connection will simply fail.

So, my hunch is that hostapd will need to handle more corner cases.
Specifically, it seems to me that it is probably a good idea to simply
undo any address translation that the kernel will have done if the
NO_STA flag is not set.

It would be useful to have tests for these corner cases. I am not sure
we can currently test this easily using hwsim as it will just randomize
the link addresses each time.

Benjamin

On Thu, 2026-08-06 at 22:01 +0530, Ramasamy Kaliappan wrote:
> Current hostapd design assumes that a STA entry already exists in the
> driver when management frames receive with the source address translated
> to the MLD address.
> 
> In some roaming and steering scenarios, an associated STA can reuse
> the same MLD address with a different link address. hostapd cannot
> find whether such a frame came from the real client or a spoofed
> source when it sees only the MLD address, which can break SAE and
> (re)association flows for MLD STAs, especially after SA Query timeout
> or when the link address changes.
> 
> To address this, nl80211 CMD FRAME is extended with a new attribute
> NL80211_ATTR_FRAME_CMD_NO_STA that classifies authentication and
> association frames as coming from a unauthorized STA. hostapd uses
> this hint to handle these frames without requiring a pre‑existing STA
> entry and to allow the station to reconnect cleanly after the SA Query
> procedure has completed.
> 
> The new hwsim testcase eht_mld_sae_three_links_legacy_no_sta in
> tests/hwsim/test_sta_reconnect_no_sta.py simulates an MLD AP where
> the first station connects on two links using M1 as the MLD address
> and L1 and L2 as link addresses, and a second station then tries
> to connect using the same MLD address but different link addresses.
> This provides a base to extend hwsim coverage for other no_sta
> handling scenarios.
> 
> Note:
> This patchset, validated with the following driver-dependent patches,
> [PATCH wireless-next 0/8] Adding NO_STA flag and reworking RX link resolution
> 
> Ramasamy Kaliappan (6):
>   nl80211: Add support for NL80211_ATTR_FRAME_CMD_NO_STA attribute
>   hostapd: Handle no_sta flag in auth
>   hostapd: Handle no_sta flag in association
>   hostapd: Allow STA association after SA Query timeout
>   hostapd: Add debug ack status for tx status
>   hwsim: Add hwsim test case for no_sta handling
> 
>  src/ap/ap_drv_ops.c                |  22 +++-
>  src/ap/ap_drv_ops.h                |   4 +
>  src/ap/drv_callbacks.c             |   1 +
>  src/ap/hostapd.h                   |   2 +
>  src/ap/ieee802_11.c                | 197 ++++++++++++++++++++++-------
>  src/ap/sta_info.c                  |   4 +-
>  src/ap/sta_info.h                  |   6 +
>  src/drivers/driver.h               |   9 +-
>  src/drivers/driver_nl80211.c       |  33 +++--
>  src/drivers/driver_nl80211_event.c |  27 ++--
>  tests/hwsim/test_eht.py            |  63 +++++++++
>  wpa_supplicant/driver_i.h          |   2 +-
>  wpa_supplicant/mesh_mpm.c          |   1 +
>  13 files changed, 295 insertions(+), 76 deletions(-)
> 
> 
> base-commit: 2328ccef7ef12b4ea226d3aa91cdb9c680711045
> prerequisite-patch-id: 0d057d961b216c134a5f0547b8b29797a4d4bd71



More information about the Hostap mailing list