Do not set own_disconnect_req flag if not connected
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 10 Jun 2015 12:40:35 +0000 (15:40 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 10 Jun 2015 12:42:57 +0000 (15:42 +0300)
commite66bcedd3ea62c1fa72f95cea918483ec5cb84a5
tree204ed70b0897a9c94dfc3f3f818f5998397f6d31
parent8d2ed87d82dd76a8d32227c6b39e1e8e9db7efea
Do not set own_disconnect_req flag if not connected

This fixes some issues where a disconnection event may get ignored if an
earlier operation to remove or disable a network resulted in an attempt
to disconnect event though no connection was in place.
wpa_s->current_ssid != NULL alone is not sufficient to determine that
there will be a driver event notifying completion of such disconnection
request. Set own_disconnect_req to 1 only if wpa_s->wpa_state is also
indicating that there is a connection or an attempt to complete one.

This showed up in a failure, e.g., when running the hwsim test case
scan_int followed by ap_vlan_wpa2_psk_radius_required where the latter
ended up not processing a connection failure event and getting stuck not
trying to run a new scan and connection attempt.

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