aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/blacklist.h
diff options
context:
space:
mode:
authorKevin Lund <kglund@google.com>2020-06-11 21:11:17 (GMT)
committerJouni Malinen <j@w1.fi>2020-10-10 15:34:59 (GMT)
commit164b8dd8e4be8a563cf18a1cdc2929a552dbfc34 (patch)
tree58d2bd42f224785f1cbb9c41b58a31e47778597b /wpa_supplicant/blacklist.h
parentd530110028f0c343085c1c605d80f5d0da55c274 (diff)
downloadhostap-164b8dd8e4be8a563cf18a1cdc2929a552dbfc34.zip
hostap-164b8dd8e4be8a563cf18a1cdc2929a552dbfc34.tar.gz
hostap-164b8dd8e4be8a563cf18a1cdc2929a552dbfc34.tar.bz2
wpa_supplicant: Add wpa_blacklist_update()
This change adds the function wpa_blacklist_update(), which goes through all blacklist entries and deletes them if their blacklist expired over an hour ago. The purpose of this is to remove stale entries from the blacklist which likely do not reflect the current condition of device's network surroundings. This function is called whenever the blacklist is polled, meaning that the caller always gets an up-to-date reflection of the blacklist. Another solution to clearing the blacklist that was considered was to slowly reduce the counts of blacklist entries over time, and delete them if the counts dropped below 0. We decided to go with the current solution instead because an AP's "problematic" status is really a binary thing: either the AP is no longer problematic, or it's still causing us problems. So if we see any more problems within a reasonable amount of time, it makes sense to just keep the blacklist where it was since the AP is likely still undergoing the same issue. If we go a significant amount of time (semi-arbitrarily chosen as 1 hour) without any issues with an AP, it's reasonable to behave as if the AP is no longer undergoing the same issue. If we see more problems at a later time, we can start the blacklisting process fresh again, treating this as a brand new issue. Signed-off-by: Kevin Lund <kglund@google.com> Signed-off-by: Brian Norris <briannorris@chromium.org>
Diffstat (limited to 'wpa_supplicant/blacklist.h')
-rw-r--r--wpa_supplicant/blacklist.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/wpa_supplicant/blacklist.h b/wpa_supplicant/blacklist.h
index 54ca6a3..a1c60d5 100644
--- a/wpa_supplicant/blacklist.h
+++ b/wpa_supplicant/blacklist.h
@@ -28,5 +28,6 @@ int wpa_blacklist_add(struct wpa_supplicant *wpa_s, const u8 *bssid);
int wpa_blacklist_del(struct wpa_supplicant *wpa_s, const u8 *bssid);
int wpa_blacklist_is_blacklisted(struct wpa_supplicant *wpa_s, const u8 *bssid);
void wpa_blacklist_clear(struct wpa_supplicant *wpa_s);
+void wpa_blacklist_update(struct wpa_supplicant *wpa_s);
#endif /* BLACKLIST_H */