eiwd

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

commit 66b73262dffe4b9955ee4e64f438fe1ee2a8f101
parent 877d910a447972e0d516f927187026337700a00a
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Wed, 19 May 2021 09:56:59 -0500

station: Check return of network_bss_select

network_bss_select can return NULL if no suitable BSSes are found, or if
all of them are blacklisted.  Make sure to skip the network if this
happens.

Diffstat:
Msrc/station.c | 19+++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/station.c b/src/station.c @@ -177,17 +177,19 @@ static void station_autoconnect_next(struct station *station) const char *ssid = network_get_ssid(network); struct scan_bss *bss = network_bss_select(network, false); - l_debug("Considering autoconnecting to BSS '%s' with SSID: %s," - " freq: %u, rank: %u, strength: %i", - util_address_to_string(bss->addr), ssid, - bss->frequency, bss->rank, - bss->signal_strength); + l_debug("autoconnect: Trying SSID: %s", ssid); - if (blacklist_contains_bss(bss->addr)) + if (!bss) { + l_debug("autoconnect: No suitable BSSes found"); continue; + } - r = network_autoconnect(network, bss); + l_debug("autoconnect: '%s' freq: %u, rank: %u, strength: %i", + util_address_to_string(bss->addr), + bss->frequency, bss->rank, + bss->signal_strength); + r = network_autoconnect(network, bss); if (!r) { station_enter_state(station, STATION_STATE_CONNECTING); @@ -200,7 +202,8 @@ static void station_autoconnect_next(struct station *station) return; } else - l_debug("Failed to autoconnect to %s (%d)", ssid, r); + l_debug("autoconnect: network_autoconnect: %s (%d)", + strerror(-r), r); } }