[PATCH 09/25] MBO: Add association disallowed support
Ilan Peer
ilan.peer at intel.com
Mon Feb 15 06:53:29 PST 2016
From: David Spinadel <david.spinadel at intel.com>
Prevent association to APs that have association disallowed
attribute in MBO IE in beacons or probe responses.
Signed-off-by: David Spinadel <david.spinadel at intel.com>
---
wpa_supplicant/events.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 3264dc0..cb44674 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -827,6 +827,9 @@ static struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
const u8 *ie;
struct wpa_ssid *ssid;
int osen;
+#ifdef CONFIG_MBO
+ const u8 *assoc_disallow;
+#endif /* CONFIG_MBO */
ie = wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE);
wpa_ie_len = ie ? ie[1] : 0;
@@ -1064,6 +1067,16 @@ static struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
(unsigned int) diff.usec);
continue;
}
+#ifdef CONFIG_MBO
+ assoc_disallow = wpas_mbo_get_bss_attr(wpa_s, bss,
+ MBO_ATTR_ID_ASSOC_DISALLOW);
+ if (assoc_disallow) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ " skip - MBO association disallowed, reason %u",
+ assoc_disallow[2]);
+ continue;
+ }
+#endif /* CONFIG_MBO */
/* Matching configuration found */
return ssid;
--
1.9.1
More information about the Hostap
mailing list