commit 2d26304663e00cb58b5519cb1b7dc05cca1fbbe5
parent 195d1f872060ffd38b2e7f965681541b25a07099
Author: James Prestwood <prestwoj@gmail.com>
Date: Tue, 5 Dec 2023 07:46:38 -0800
scan: parse password identifier/exclusive bits
These bits are used to communicate to the station that SAE password
identifiers are used or required.
Diffstat:
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git 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
@@ -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 {