public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 01/10] scan: parse password identifier/exclusive bits
@ 2023-12-05 15:46 James Prestwood
  2023-12-05 15:46 ` [PATCH 02/10] network: pass scan_bss into network_load_psk James Prestwood
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: James Prestwood @ 2023-12-05 15:46 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

These bits are used to communicate to the station that SAE password
identifiers are used or required.
---
 src/scan.c | 20 +++++++++++++++++---
 src/scan.h |  2 ++
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/scan.c b/src/scan.c
index 5aa92a90..f48ffdef 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -1404,10 +1404,24 @@ static bool scan_parse_bss_information_elements(struct scan_bss *bss,
 			 * Currently only Proxy ARP bit (12) is checked, and if
 			 * not found, this is not a fatal error.
 			 */
-			if (iter.len < 2)
-				break;
+			if (iter.len >= 2)
+				bss->proxy_arp = test_bit(iter.data, 12);
+
+			/*
+			 * 802.11-2020 Table 9-153
+			 *
+			 * The spec merely mentions the "exclusive" bit and
+			 * doesn't enforce a requirement to check it anywhere.
+			 * But if set it would indicate the AP will only accept
+			 * auths when a password ID is used so store this in
+			 * order to fail early if no ID is set.
+			 */
+			if (iter.len >= 11) {
+				bss->sae_pw_id_used = test_bit(iter.data, 81);
+				bss->sae_pw_id_exclusive =
+							test_bit(iter.data, 82);
+			}
 
-			bss->proxy_arp = test_bit(iter.data, 12);
 		}
 	}
 
diff --git a/src/scan.h b/src/scan.h
index 0db7752d..65caf41c 100644
--- a/src/scan.h
+++ b/src/scan.h
@@ -88,6 +88,8 @@ struct scan_bss {
 	uint8_t cost_level : 3;
 	uint8_t cost_flags : 4;
 	bool dpp_configurator : 1;
+	bool sae_pw_id_used : 1;
+	bool sae_pw_id_exclusive : 1;
 };
 
 struct scan_parameters {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-12-06 19:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05 15:46 [PATCH 01/10] scan: parse password identifier/exclusive bits James Prestwood
2023-12-05 15:46 ` [PATCH 02/10] network: pass scan_bss into network_load_psk James Prestwood
2023-12-05 15:46 ` [PATCH 03/10] handshake: add password identifier/setter James Prestwood
2023-12-05 15:46 ` [PATCH 04/10] network: add support for SAE password identifiers James Prestwood
2023-12-06 17:08   ` Denis Kenzior
2023-12-06 18:44     ` James Prestwood
2023-12-06 19:44       ` Denis Kenzior
2023-12-06 19:53         ` James Prestwood
2023-12-05 15:46 ` [PATCH 05/10] sae: include password identifier IE in commit James Prestwood
2023-12-05 15:46 ` [PATCH 06/10] doc: document [Security].PasswordIdentifier James Prestwood
2023-12-05 15:46 ` [PATCH 07/10] auto-t: add H2E password identifier test James Prestwood
2023-12-05 15:46 ` [PATCH 08/10] mpdu: add unknown password identifier status James Prestwood
2023-12-05 15:46 ` [PATCH 09/10] sae: add debugging for incorrect password identifier James Prestwood
2023-12-05 15:46 ` [PATCH 10/10] auto-t: throw exception if executable is missing James Prestwood
2023-12-06 17:00 ` [PATCH 01/10] scan: parse password identifier/exclusive bits Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox