]> git.ipfire.org Git - thirdparty/hostap.git/commit
nl80211: Use process_bss_event() for the nl_connect handler
authorAvraham Stern <avraham.stern@intel.com>
Wed, 17 Feb 2021 10:14:33 +0000 (12:14 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 6 Mar 2021 11:36:20 +0000 (13:36 +0200)
commitab89291928faf86127091081f3ef40d9be58ed68
tree954577949985365c78ed356722064097a07c44d1
parentf7835ac163ddcf2ed55e17c4c1a5b1b1a59bf210
nl80211: Use process_bss_event() for the nl_connect handler

The nl_connect is initialized with the process_bss_event() handler.
However, it is used several times with the default valid handler. As a
result, if a message that is only valid for process_bss_event() is
received while the default handler is used, it will be dropped.

This has been observed in a case where during the 4-way handshake, a
Beacon frame is received on the AP side, which triggers a beacon update,
just before receiving the next EAPOL. When send_and_recv_msgs_owner() is
called for sending the NL80211_CMD_SET_BEACON command, the
NL80211_CMD_CONTROL_PORT_FRAME event is already pending. As a result, it
is received with the default handler, which drops it. Since the EAPOL
frame is dropped, the connection attempt fails.

Fix it by using the process_bss_event() handler when the nl_connect
handler is used.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
src/drivers/driver_nl80211.c
src/drivers/driver_nl80211.h
src/drivers/driver_nl80211_scan.c