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.
This commit is contained in:
Denis Kenzior 2021-05-24 17:19:14 -05:00
parent db3024eed6
commit ca561be4b9
1 changed files with 2 additions and 2 deletions

View File

@ -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,