network: fix autoconnect for Open networks

This code path was never tested and used to ensure a OWE transition
candidate gets selected over an open one (e.g. if all the BSS's are
blacklisted). But this logic was incorrect and the path was being
taken for BSS's that did not contain the owe_trans element, basically
all BSS's. For RSN's this was somewhat fine since the final check
would set a candidate, but for open BSS's the loop would start over
and potentially complete the loop without ever returning a candidate.
If fallback was false, NULL would be returned.

To fix this only take the OWE transition path if its an OWE transition
BSS, i.e. inverse the logic.
This commit is contained in:
James Prestwood 2021-10-20 13:53:30 -07:00 committed by Denis Kenzior
parent 2dec023f63
commit e4b78d83d6
1 changed files with 1 additions and 1 deletions

View File

@ -1136,7 +1136,7 @@ struct scan_bss *network_bss_select(struct network *network,
candidate = bss;
/* OWE Transition BSS */
if (!bss->owe_trans) {
if (bss->owe_trans) {
/* Don't want to connect to the Open BSS if possible */
if (!bss->rsne)
continue;