]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Use driver event to indicate failure on authentication retry
authorJouni Malinen <j@w1.fi>
Sun, 4 Dec 2011 20:28:30 +0000 (22:28 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 4 Dec 2011 20:28:30 +0000 (22:28 +0200)
When using authentication retry within driver_nl80211.c, a failure on the
second attempt has to be indicated with a driver event since the return
code from wpa_driver_nl80211_authenticate() is not actually delivered to
the core code in that case.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/drivers/driver_nl80211.c

index 085ee204e51cd3a0132553c286ef39c468da1a25..12f80e54aaf0132ffb029d9a96924cded0ab3410 100644 (file)
@@ -4011,6 +4011,19 @@ retry:
                                nl80211_copy_auth_params(drv, params);
                                drv->scan_for_auth = 1;
                        }
+               } else if (is_retry) {
+                       /*
+                        * Need to indicate this with an event since the return
+                        * value from the retry is not delivered to core code.
+                        */
+                       union wpa_event_data event;
+                       wpa_printf(MSG_DEBUG, "nl80211: Authentication retry "
+                                  "failed");
+                       os_memset(&event, 0, sizeof(event));
+                       os_memcpy(event.timeout_event.addr, drv->auth_bssid_,
+                                 ETH_ALEN);
+                       wpa_supplicant_event(drv->ctx, EVENT_AUTH_TIMED_OUT,
+                                            &event);
                }
 
                goto nla_put_failure;