commit ca561be4b975f695a5f603777ef041fb891e40d8
parent db3024eed6935d735c4110169a937d3d966a82b8
Author: Denis Kenzior <denkenz@gmail.com>
Date: Mon, 24 May 2021 17:19:14 -0500
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.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git 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,