aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorAhmad Masri <amasri@codeaurora.org>2018-04-16 10:52:27 (GMT)
committerJouni Malinen <j@w1.fi>2018-04-19 21:32:49 (GMT)
commit3dc3afe298f0b57540ccc78c11e5aeac95184875 (patch)
tree0f91502741a9d328ba0d6a74a654fe02022f546c /wpa_supplicant
parentb55c623e4c8af26f2eda29f1dc4b95783f875c17 (diff)
downloadhostap-3dc3afe298f0b57540ccc78c11e5aeac95184875.zip
hostap-3dc3afe298f0b57540ccc78c11e5aeac95184875.tar.gz
hostap-3dc3afe298f0b57540ccc78c11e5aeac95184875.tar.bz2
FT: Add MDE to assoc request IEs in connect params
Add MDE (mobility domain element) to Association Request frame IEs in the driver assoc params. wpa_supplicant will add MDE only if the network profile allows FT, the selected AP supports FT, and the mobility domain ID matches. Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_supplicant.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 7e7e84a..c8f4802 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2716,6 +2716,29 @@ static u8 * wpas_populate_assoc_ies(
}
#endif /* CONFIG_OWE */
+#ifdef CONFIG_IEEE80211R
+ /*
+ * Add MDIE under these conditions: the network profile allows FT,
+ * the AP supports FT, and the mobility domain ID matches.
+ */
+ if (wpa_key_mgmt_ft(wpa_sm_get_key_mgmt(wpa_s->wpa))) {
+ const u8 *mdie = wpa_bss_get_ie(bss, WLAN_EID_MOBILITY_DOMAIN);
+
+ if (mdie && mdie[1] >= MOBILITY_DOMAIN_ID_LEN) {
+ const u8 *md = mdie + 2;
+ const u8 *wpa_md = wpa_sm_get_ft_md(wpa_s->wpa);
+
+ if (os_memcmp(md, wpa_md,
+ MOBILITY_DOMAIN_ID_LEN) == 0) {
+ /* Add mobility domain IE */
+ wpa_ie_len += wpa_ft_add_mdie(
+ wpa_s->wpa, wpa_ie + wpa_ie_len,
+ max_wpa_ie_len - wpa_ie_len, mdie);
+ }
+ }
+ }
+#endif /* CONFIG_IEEE80211R */
+
params->wpa_ie = wpa_ie;
params->wpa_ie_len = wpa_ie_len;
params->auth_alg = algs;