]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Disable network temporarily on repeated connection failures
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 25 Apr 2013 14:28:50 +0000 (17:28 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 25 Apr 2013 14:28:50 +0000 (17:28 +0300)
Previously, only explicit indications of authentication failures were
used to disable a network block temporarily. Extend this to use multiple
failed connection attempts as a sign of a possible authentication or
authorization failure to reduce the frequency of connection attempts
with a network that does not seem to allow connection.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

wpa_supplicant/wpa_supplicant.c

index dc404a387f0b30be27e8e380d33b74ad80d82f9e..869fe3f7b7973ada45a878f64bb1dc5b766cb6a7 100644 (file)
@@ -3563,6 +3563,12 @@ void wpas_connection_failed(struct wpa_supplicant *wpa_s, const u8 *bssid)
         */
        count += wpa_s->extra_blacklist_count;
 
+       if (count > 3 && wpa_s->current_ssid) {
+               wpa_printf(MSG_DEBUG, "Continuous association failures - "
+                          "consider temporary network disabling");
+               wpas_auth_failed(wpa_s);
+       }
+
        switch (count) {
        case 1:
                timeout = 100;