diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index c9ad4caf8..f0e1d4e45 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -3525,6 +3525,17 @@ void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid) */ eloop_cancel_timeout(wpa_supplicant_timeout, wpa_s, NULL); + if (wpa_s->disconnected) { + /* + * There is no point in blacklisting the AP if this event is + * generated based on local request to disconnect. + */ + wpa_dbg(wpa_s, MSG_DEBUG, "Ignore connection failure " + "indication since interface has been put into " + "disconnected state"); + return; + } + /* * Add the failed BSSID into the blacklist and speed up next scan * attempt if there could be other APs that could accept association.