eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 52878090436eaf41990742e57f226fa6acd409a9
parent ea9ff2dcaf6e1d225bcd11c0ed092652707f5f64
Author: James Prestwood <prestwoj@gmail.com>
Date:   Wed, 28 May 2025 13:10:21 -0700

network: make clearing network blacklist a separate operation

This adds a new API network_clear_blacklist() and removes this
functionality from network_connected(). This is done to support BSS
iteration when netconfig is enabled. Since a call to
network_connected() will happen prior to netconfig completing we
cannot clear the blacklist until netconfig has either passed or
failed.

Diffstat:
Msrc/network.c | 9++++++---
Msrc/network.h | 1+
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/network.c b/src/network.c @@ -168,6 +168,11 @@ static bool network_secret_check_cacheable(void *data, void *user_data) return false; } +void network_clear_blacklist(struct network *network) +{ + l_queue_clear(network->blacklist, NULL); +} + void network_connected(struct network *network) { enum security security = network_get_security(network); @@ -198,8 +203,6 @@ void network_connected(struct network *network) l_queue_foreach_remove(network->secrets, network_secret_check_cacheable, network); - l_queue_clear(network->blacklist, NULL); - network->provisioning_hidden = false; } @@ -207,7 +210,7 @@ void network_disconnected(struct network *network) { network_settings_close(network); - l_queue_clear(network->blacklist, NULL); + network_clear_blacklist(network); if (network->provisioning_hidden) station_hide_network(network->station, network); diff --git a/src/network.h b/src/network.h @@ -74,6 +74,7 @@ bool network_bss_update(struct network *network, struct scan_bss *bss); const char *network_bss_get_path(const struct network *network, const struct scan_bss *bss); bool network_bss_list_isempty(struct network *network); +void network_clear_blacklist(struct network *network); const char *__network_path_append_bss(const char *network_path, const struct scan_bss *bss);