From ca561be4b975f695a5f603777ef041fb891e40d8 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 24 May 2021 17:19:14 -0500 Subject: [PATCH] network: Clear temporary ban list in network_disconnected The temporary ban list is cleared when a network is connected to successfully, and also in network_connect_failed. Unfortunately, network_connect_failed is not called in all paths (i.e. during autoconnect) since it messes with the state of secrets and passphrases. Clear the list in network_disconnected() instead, since it is guaranteed to be called in every circumstance. --- src/network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network.c b/src/network.c index b2230da9..617559e6 100644 --- a/src/network.c +++ b/src/network.c @@ -172,6 +172,8 @@ void network_connected(struct network *network) void network_disconnected(struct network *network) { network_settings_close(network); + + l_queue_clear(network->blacklist, NULL); } /* First 64 entries calculated by 1 / pow(n, 0.3) for n >= 1 */ @@ -611,8 +613,6 @@ void network_connect_failed(struct network *network, bool in_handshake) l_queue_destroy(network->secrets, eap_secret_info_free); network->secrets = NULL; - - l_queue_clear(network->blacklist, NULL); } static bool hotspot_info_matches(struct network *network,