]> git.ipfire.org Git - thirdparty/hostap.git/commit
Fix ENABLE_NETWORK not to reconnect in disconnected state
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 23 Oct 2013 08:51:45 +0000 (11:51 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 23 Oct 2013 09:09:46 +0000 (12:09 +0300)
commitd2592497624d7dff53e71cc01fc2d5db1e59733e
tree8483ac3a17ff741c311e852e50470ae733530cc9
parent677cf190910f358f0435a890d0ccf2019597a7a0
Fix ENABLE_NETWORK not to reconnect in disconnected state

DISCONNECT followed by ENABLE_NETWORK ended up starting a scan for a new
connection due to wpa_supplicant_enable_one_network() setting
wpa_s->reassociate = 1. This was done regardless of wpa_s->disconnected
being 1 which should imply that wpa_supplicant should not try to connect
before asked explicitly with REASSOCIATE or RECONNECT.

Fix this by making ENABLE_NETWORK setting of reassociate = 1 and
starting of scans for connection conditional on wpa_s->disconnected ==
0. This will make ENABLE_NETWORK trigger a connection only if
wpa_supplicant is already in a state where it would try to connect if
there are any enabled networks.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/wpa_supplicant.c