diff --git a/src/network.c b/src/network.c index f7172c78..711fb296 100644 --- a/src/network.c +++ b/src/network.c @@ -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;