]> git.ipfire.org Git - thirdparty/hostap.git/commit
nl80211: Do not ignore disconnect event in case of !drv->associated
authorHu Wang <huw@codeaurora.org>
Wed, 8 Aug 2018 03:21:05 +0000 (11:21 +0800)
committerJouni Malinen <j@w1.fi>
Fri, 31 Aug 2018 09:01:33 +0000 (12:01 +0300)
commitb898b655824a5553cc1a4dde5e8ed4d628aacc08
tree8c6d90e1fe907cef9f07472aab39504f7c65c970
parent2697e85ea97c42e320fda49ffc8da70d8f19ff61
nl80211: Do not ignore disconnect event in case of !drv->associated

Commit 3f53c006c7d7362cf715ceaeda92c69d91ea7b63 ('nl80211: Ignore
disconnect event in case of locally generated request') made
wpa_supplicant ignore the next received disconnect event for cases where
wpa_supplicant itself requested a disconnection. This can result in
ignoring a disconnection notification in some cases.

Considering a P2P Client receiving disconnect event from the kernel
after a P2P group is started, drv->ignore_next_local_disconnect is
cleared to 0, then wpa_driver_nl80211_disconnect() will be called during
the removal of the group, in which drv->ignore_next_local_disconnect is
set to 1 by mistake.

Do not allow ignore_next_local_{disconnect,deauth} to be set to 1 if the
driver is not in associated state (drv->associated is 0) to avoid this
type of cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/drivers/driver_nl80211.c