3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2025-01-03 10:32:33 +01:00

network: prefer OWE transition BSS over open

There isn't much control station has with how BSS's are inserted to
a network object. The rank algorithm makes that decision. Because of
this we could end up in a situation where the Open BSS is preferred
over the OWE transition BSS.

In attempt to better handle this any Open BSS in this type of network
will not be chosen unless its the only candidate (e.g. no other BSSs,
inability to connect with OWE, or an improperly configured network).
This commit is contained in:
James Prestwood 2021-09-17 15:58:39 -07:00 committed by Denis Kenzior
parent e462dcda56
commit 8a735edac0

View File

@ -1110,6 +1110,11 @@ const struct l_queue_entry *network_bss_list_get_entries(
return l_queue_get_entries(network->bss_list);
}
static bool bss_is_owe(struct scan_bss *bss)
{
return !l_memeqzero(bss->owe_trans_bssid, 6) && bss->rsne;
}
struct scan_bss *network_bss_select(struct network *network,
bool fallback_to_blacklist)
{
@ -1135,6 +1140,17 @@ struct scan_bss *network_bss_select(struct network *network,
if (!candidate)
candidate = bss;
/* OWE Transition BSS */
if (!l_memeqzero(bss->owe_trans_bssid, 6)) {
/* Don't want to connect to the Open BSS if possible */
if (!bss->rsne)
continue;
/* Candidate is not OWE, set this as new candidate */
if (!bss_is_owe(candidate))
candidate = bss;
}
/* check if temporarily blacklisted */
if (l_queue_find(network->blacklist, match_bss, bss))
continue;