aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-11-03 11:50:17 (GMT)
committerJouni Malinen <j@w1.fi>2012-11-03 11:50:17 (GMT)
commit10737aba2235cbb03968997d991087e579ee828d (patch)
treed470e27707f3bd9c61dc349a0c449f2722f1cc29 /wpa_supplicant/events.c
parent5ff2c7faedd13dfd27659181b5b156171e875847 (diff)
downloadhostap-10737aba2235cbb03968997d991087e579ee828d.zip
hostap-10737aba2235cbb03968997d991087e579ee828d.tar.gz
hostap-10737aba2235cbb03968997d991087e579ee828d.tar.bz2
Handle assoc reject events without wpa_supplicant SME
If the driver indicates the association (or authentication) was rejected, wpa_supplicant should handle this connection failure similarly to other cases. Previously, this was only handled with drivers that use wpa_supplicant SME. In case of cfg80211-based drivers, a rejected association was actually already handled since cfg80211 generates a deauthentication event after indicating connection failure. However, rejected authentication resulted in wpa_supplicant waiting for authentication timeout to expire which is unnecessary long wait. Fix this by calling wpas_connection_failed() to use the common mechanism to reschedule a new connection attempt with the previously attempted BSSID blacklisted. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 53b8338..1aa9c21 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2524,6 +2524,13 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
data->assoc_reject.status_code);
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)
sme_event_assoc_reject(wpa_s, data);
+ else {
+ const u8 *bssid = data->assoc_reject.bssid;
+ if (bssid == NULL || is_zero_ether_addr(bssid))
+ bssid = wpa_s->pending_bssid;
+ wpas_connection_failed(wpa_s, bssid);
+ wpa_supplicant_mark_disassoc(wpa_s);
+ }
break;
case EVENT_AUTH_TIMED_OUT:
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)