]> git.ipfire.org Git - thirdparty/hostap.git/commit
Drop unexpected connection event while disconnected
authorVamsi Krishna <vamsin@codeaurora.org>
Thu, 3 Dec 2020 16:45:29 +0000 (22:15 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 21 Dec 2020 12:06:52 +0000 (14:06 +0200)
commit084b3d2f8a85ef6e64ecf1f7beec077ca858f516
treec061fc20df16a8172d18beb136c93c11ccb90ca7
parent73c7c2da997592ac41bd88d3c74b0c70bd53b95f
Drop unexpected connection event while disconnected

If there is a disconnect command from wpa_supplicant immediately after
the driver sends a connection event to userspace but before that event
is received and processed by wpa_supplicant, wpa_supplicant processes
the disconnect command and a self-generated disconnected event first
followed by the connected event received from the driver. As a result
wpa_supplicant moves to the WPA_COMPLETED state.  Whereas the driver
processes the disconnect command received from wpa_supplicant after it
sends the connected event and moves to the disconnected state. Due to
this race between the disconnect command from wpa_supplicant and the
connected event from the driver, wpa_supplicant is moving to the
connected state though the driver is moving to the disconnected state
which results in abnormal functionality.

Ignore the connection event coming from the driver when wpa_supplicant
is not trying to connect after a disconnect command is issued but before
the next connect command is issued to fix the above mentioned race
condition.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/events.c