aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mbo.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/mbo.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/mbo.c')
-rw-r--r--wpa_supplicant/mbo.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/wpa_supplicant/mbo.c b/wpa_supplicant/mbo.c
index d6f2e76..a60d1d3 100644
--- a/wpa_supplicant/mbo.c
+++ b/wpa_supplicant/mbo.c
@@ -36,6 +36,24 @@ static int wpas_mbo_validate_non_pref_chan(u8 oper_class, u8 chan, u8 reason)
}
+const u8 * wpas_mbo_get_bss_attr(struct wpa_bss *bss, enum mbo_attr_id attr)
+{
+ const u8 *mbo, *end;
+
+ if (!bss)
+ return NULL;
+
+ mbo = wpa_bss_get_vendor_ie(bss, MBO_IE_VENDOR_TYPE);
+ if (!mbo)
+ return NULL;
+
+ end = mbo + 2 + mbo[1];
+ mbo += MBO_IE_HEADER;
+
+ return get_ie(mbo, end - mbo, attr);
+}
+
+
static void wpas_mbo_non_pref_chan_attr_body(struct wpa_supplicant *wpa_s,
struct wpabuf *mbo,
u8 start, u8 end)