]> git.ipfire.org Git - thirdparty/hostap.git/commit
Fix race condition between AssocResp callback and 4addr event
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 19 Dec 2016 23:30:09 +0000 (01:30 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 19 Dec 2016 23:30:09 +0000 (01:30 +0200)
commit1f0fdaf0e45fac76fcd6d2382e28e0298e1edef0
tree0259df6d97feaa0b16123106bcaf60800bcc5f92
parentad02e79d12fd70ed6bd5fbaf64001a2851e5bb7b
Fix race condition between AssocResp callback and 4addr event

It is apparently possible for the NL80211_CMD_UNEXPECTED_4ADDR_FRAME
event to be delivered to hostapd before the NL80211_CMD_FRAME_TX_STATUS
event for (Re)Association Response frame. This resulted in the 4-address
WDS mode not getting enabled for a STA. This could occur in particular
when operating under heavy load and the STA is reconnecting to the same
AP in a sequence where Deauthentication frame is followed immediately by
Authentication frame and the driver event processing gets delayed due to
removal of the previous netdev taking time in the middle of this
sequence.

Fix this by recording a pending item for 4-address WDS enabling if the
NL80211_CMD_UNEXPECTED_4ADDR_FRAME event would have been dropped due to
incompleted association and then process this pending item if the TX
status for the (Re)Association Response frame is received and it shows
that the frame was acknowledged.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/ieee802_11.c
src/ap/sta_info.h