From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH v2 2/7] wiphy: fix wiphy_can_connect AKM checks
Date: Tue, 30 Mar 2021 11:48:03 -0700 [thread overview]
Message-ID: <20210330184808.744574-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20210330184808.744574-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]
Commit 6e8b76527 added a switch statement for AKM suites which
was not correct as this is a bitmask and may contain multiple
values. Intead we can rely on wiphy_select_akm which is a more
robust check anyways.
---
src/wiphy.c | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/src/wiphy.c b/src/wiphy.c
index 35872577..f570495e 100644
--- a/src/wiphy.c
+++ b/src/wiphy.c
@@ -414,24 +414,14 @@ bool wiphy_can_connect(struct wiphy *wiphy, struct scan_bss *bss)
rsn_info.group_management_cipher))
return false;
+ /*
+ * Just assume FILS capable at this point. Station will verify
+ * this later, but at this point we cannot know if the network
+ * settings have the needed FILS identity.
+ */
+ if (!wiphy_select_akm(wiphy, bss, true))
+ return false;
- switch (rsn_info.akm_suites) {
- case IE_RSN_AKM_SUITE_SAE_SHA256:
- case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256:
- if (!wiphy_can_connect_sae(wiphy, NULL))
- return false;
-
- break;
- case IE_RSN_AKM_SUITE_OWE:
- case IE_RSN_AKM_SUITE_FILS_SHA256:
- case IE_RSN_AKM_SUITE_FILS_SHA384:
- case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256:
- case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384:
- if (!wiphy->support_cmds_auth_assoc)
- return false;
-
- break;
- }
} else if (r != -ENOENT)
return false;
--
2.26.2
next prev parent reply other threads:[~2021-03-30 18:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-30 18:48 [PATCH v2 1/7] wiphy: add offload out parameter to wiphy_can_connect_sae James Prestwood
2021-03-30 18:48 ` James Prestwood [this message]
2021-03-30 19:58 ` [PATCH v2 2/7] wiphy: fix wiphy_can_connect AKM checks Denis Kenzior
2021-03-30 18:48 ` [PATCH v2 3/7] wiphy: allow FT AKM to be used if Auth/Assoc is not supported James Prestwood
2021-03-30 18:48 ` [PATCH v2 4/7] netdev: allow PSK offload for FT AKMs James Prestwood
2021-03-30 20:25 ` Denis Kenzior
2021-03-30 20:40 ` James Prestwood
2021-03-30 18:48 ` [PATCH v2 5/7] station: set handshake->offload if required James Prestwood
2021-03-30 18:48 ` [PATCH v2 6/7] doc: document new [General].4WayOffload James Prestwood
2021-03-30 20:49 ` Denis Kenzior
2021-03-30 18:48 ` [PATCH v2 7/7] wiphy: remove wiphy_supports_cmds_auth_assoc James Prestwood
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=20210330184808.744574-2-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.01.org \
/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