[RFC] Locally abort associations on ASSOC_REJECT events
Christopher Wiley
wiley
Wed Oct 10 14:51:03 PDT 2012
Respond to AP triggered association failures by locally aborting the
association process. For instance, certain enterprise AP's return
status code 17 (too many STAs) and reject association requests when a
particular AP has too many associated devices. Locally aborting the
association process lets wpa_supplicant begin roaming immediately rather
than waiting for the authentication timeout to fire.
This change duplicates similar behavior that occurs when the driver
supports SME.
---
wpa_supplicant/events.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 53b8338..854816b 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
+ /* We could wait for the auth timer to fire, but it is
+ * much faster to abort locally sooner rather than
+ * later.
+ */
+ wpa_supplicant_event_disassoc_finish(wpa_s,
+ data->assoc_reject.status_code, 1);
break;
case EVENT_AUTH_TIMED_OUT:
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)
--
1.7.7.3
More information about the Hostap
mailing list