From: James Prestwood <prestwoj at gmail.com>
To: iwd at lists.01.org
Subject: [PATCH v6 4/5] network: prefer OWE transition BSS over open
Date: Fri, 17 Sep 2021 14:36:21 -0700 [thread overview]
Message-ID: <20210917213622.21881-4-prestwoj@gmail.com> (raw)
In-Reply-To: 20210917213622.21881-1-prestwoj@gmail.com
[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]
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).
---
src/network.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
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;
--
2.31.1
reply other threads:[~2021-09-17 21:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210917213622.21881-4-prestwoj@gmail.com \
--to=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox