From fd85192a54926bd1bbba564228682630b8448c21 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 4 Nov 2021 10:57:54 -0700 Subject: [PATCH] scan: parse Proxy ARP bit from extended capabilities --- src/scan.c | 17 +++++++++++++++++ src/scan.h | 1 + 2 files changed, 18 insertions(+) diff --git a/src/scan.c b/src/scan.c index be5953ad..2a96943b 100644 --- a/src/scan.c +++ b/src/scan.c @@ -1252,6 +1252,23 @@ static bool scan_parse_bss_information_elements(struct scan_bss *bss, bss->rc_ie = l_memdup(iter.data - 2, iter.len + 2); break; + + case IE_TYPE_EXTENDED_CAPABILITIES: + /* 802.11-2020 9.4.2.26 + * + * "The length of the Extended Capabilities field is + * variable. If fewer bits are received in an Extended + * Capabilities field than shown in Table 9-153, the + * rest of the Extended Capabilities field bits are + * assumed to be zero" + * + * Currently only Proxy ARP bit (12) is checked, and if + * not found, this is not a fatal error. + */ + if (iter.len < 2) + break; + + bss->proxy_arp = test_bit(iter.data, 12); } } diff --git a/src/scan.h b/src/scan.h index 22981585..0378ccca 100644 --- a/src/scan.h +++ b/src/scan.h @@ -86,6 +86,7 @@ struct scan_bss { bool anqp_capable : 1; bool hs20_capable : 1; bool force_default_sae_group : 1; + bool proxy_arp : 1; uint8_t cost_level : 3; uint8_t cost_flags : 4; };