OSDN Git Service

Fix ENABLE_NETWORK not to reconnect in disconnected state (DO NOT MERGE)
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 23 Oct 2013 08:51:45 +0000 (11:51 +0300)
committerDmitry Shmidt <dimitrysh@google.com>
Thu, 24 Oct 2013 19:56:54 +0000 (12:56 -0700)
commitb4d426dac2751d1bdd93393fd7b679b445fd0565
tree75c60deb7bd1bc27db401eec7c9733ff7c0250fe
parentac427985df589ec36369ed2ae9d266d83f420e5c
Fix ENABLE_NETWORK not to reconnect in disconnected state (DO NOT MERGE)

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.

Bug: 10483405

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