Disconnect before trying to switch to a different network
authorAyala Beker <ayala.beker@intel.com>
Thu, 10 Dec 2015 10:56:05 +0000 (12:56 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 17 Dec 2015 22:24:52 +0000 (00:24 +0200)
commit0e6a2cf2829384e9864045fca2e4243cf69c6569
treebd46389b40a247f3abbbf60c2e75ee4f7be24500
parent706e11a485cef327c4de884664b8e72c8a1e6913
Disconnect before trying to switch to a different network

Previously, when wpa_supplicant received bgscan results with a preferred
network, it connected to that network without disconnecting from the
previous one. This might result in an inconsistent state of upper
layers.

Fix this by disconnecting from the current AP before connecting to the
new one when the network profile changes and there is an existing
connection.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
wpa_supplicant/events.c