aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorDavid Spinadel <david.spinadel@intel.com>2016-02-15 14:53:29 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-22 17:53:04 (GMT)
commitcb06cf34565bca70a9ada4fbe48667d249faf54b (patch)
treee18298ff5b79de060a8c8c682fcff25a723a4136 /wpa_supplicant/events.c
parentc5d193d7b3cfeeafefa65c30b216aef04dd8dde3 (diff)
downloadhostap-cb06cf34565bca70a9ada4fbe48667d249faf54b.zip
hostap-cb06cf34565bca70a9ada4fbe48667d249faf54b.tar.gz
hostap-cb06cf34565bca70a9ada4fbe48667d249faf54b.tar.bz2
MBO: Prevent association to APs that explicitly disallow this
Prevent association to MBO APs that have association disallowed attribute in MBO IE in Beacon or Probe Response frames. Signed-off-by: David Spinadel <david.spinadel@intel.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 3264dc0..76835de 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(
+ bss, MBO_ATTR_ID_ASSOC_DISALLOW);
+ if (assoc_disallow && assoc_disallow[1] >= 1) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ " skip - MBO association disallowed (reason %u)",
+ assoc_disallow[2]);
+ continue;
+ }
+#endif /* CONFIG_MBO */
/* Matching configuration found */
return ssid;