]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add BSSID into blacklist and do not clean blacklist during countermeasures
authorBartosz Markowski <bartosz.markowski@tieto.com>
Sun, 25 Dec 2011 19:09:17 +0000 (21:09 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 25 Dec 2011 19:09:17 +0000 (21:09 +0200)
If scanning continues during TKIP countermeasures, try to avoid selecting
the BSS that triggered the counter measures.

wpa_supplicant/events.c

index 89c9c8d039f6de128b0b2ba7121393cbed5e7ba9..79136664f010a4e2b229bd1994748a84d40b5ca8 100644 (file)
@@ -788,7 +788,8 @@ wpa_supplicant_pick_network(struct wpa_supplicant *wpa_s,
                                break;
                }
 
-               if (selected == NULL && wpa_s->blacklist) {
+               if (selected == NULL && wpa_s->blacklist &&
+                   !wpa_s->countermeasures) {
                        wpa_dbg(wpa_s, MSG_DEBUG, "No APs found - clear "
                                "blacklist and try again");
                        wpa_blacklist_clear(wpa_s);
@@ -1675,6 +1676,9 @@ wpa_supplicant_event_michael_mic_failure(struct wpa_supplicant *wpa_s,
 
                /* initialize countermeasures */
                wpa_s->countermeasures = 1;
+
+               wpa_blacklist_add(wpa_s, wpa_s->bssid);
+
                wpa_msg(wpa_s, MSG_WARNING, "TKIP countermeasures started");
 
                /*