[RFC PATCH] hostapd: drop later tries of an Association Request

Chris Punt chris at janga.la
Mon Nov 30 07:49:17 PST 2026


Hi Felix,

One of our deployments reported that clients on its WPA2 network kept
dropping while the open network on the same AP was fine. We reproduced
it on a test rig: an OpenWrt 24.10.7 AP (MT7915, mt76) with 70
MT7921AU stations, alternating between the WPA2 and the open network.
WPA2 clients dropped about three times as often, and the largest
single cause was 4-way handshake timeouts (reason 15) sent by the AP.

hostapd's debug log showed the pattern behind them. When the AP was
slow to answer an Association Request, the station sent another try.
hostapd processed that try as a new association, deleted the keys and
restarted the 4-way handshake, and the restarted handshake timed out.
Your patches 820 and 821 target exactly this, so we backported them
and tested them with 69 stations, all on WPA2. They removed most of
it: on a normal ramp, reason-15 timeouts fell by 70-90%. With all 69
stations joining at once they helped less: timeouts fell from 27 to 10
in 3 runs, and 9 of the 10 still showed the reset.

Across all our runs with 820 and 821, 27 timeouts were left. 25 of
them followed a repeated Association Request that got past the checks
and was processed as a new association:
- 11 weren't byte-identical: the station flips VHT Capabilities
  bit 20 (MU Beamformee Capable) between tries
- 9 arrived while the first response was still waiting for its TX
  status, past the 1 s cap
- 5 arrived after the station was authorized

The attached patch masks that one bit when comparing tries. For an
Association Request only (Reassociation keeps its existing windows),
it also drops a matching try with sequence number +1 or +2 for up to
10 s, including after authorization.

We tested the equivalent patch on our 24.10 build against 820 and 821
alone, on the same seed series. Reason-15 timeouts:
- normal ramp: 6 in 7 runs -> 0 in 7 runs
- full transmit power: 6 in 7 runs -> 0 in 6 runs
- all stations at once: 10 in 3 runs -> 3 in 3 runs, none with the
  reset

In those 16 runs, hostapd processed no repeated request as a new
association, against 27 in 17 runs with 820 and 821 alone. The
attached patch is a port of that change to main. It applies cleanly,
but only the 24.10 version has run on hardware so far.

Two questions:
- Is the bit-20 mask acceptable? We've only seen the flip on MT7921AU.
- Is a time and sequence-number window the right approach? hostapd
  isn't our area, so you may well see a better way to handle this.

Thanks,
Christopher
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-hostapd-drop-later-tries-of-an-Association-Request.patch
Type: application/octet-stream
Size: 16562 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20261130/0a111e22/attachment-0001.obj>


More information about the openwrt-devel mailing list