diff --git a/src/rsn_supp/wpa_ft.c b/src/rsn_supp/wpa_ft.c index 7c89e9b78..5c7479a1f 100644 --- a/src/rsn_supp/wpa_ft.c +++ b/src/rsn_supp/wpa_ft.c @@ -62,7 +62,7 @@ int wpa_derive_ptk_ft(struct wpa_sm *sm, const unsigned char *src_addr, /** * wpa_sm_set_ft_params - Set FT (IEEE 802.11r) parameters * @sm: Pointer to WPA state machine data from wpa_sm_init() - * @mobility_domain: Mobility domain identifier (2 octets) + * @mobility_domain: Mobility domain identifier (2 octets + 1 octet) * @r0kh_id: PMK-R0 key holder identity (1-48 octets) * @r0kh_id_len: R0KH-ID length (1-48) * @r1kh_id: PMK-R1 key holder identity (16 octets) @@ -77,6 +77,9 @@ int wpa_sm_set_ft_params(struct wpa_sm *sm, const u8 *mobility_domain, mobility_domain, MOBILITY_DOMAIN_ID_LEN); os_memcpy(sm->mobility_domain, mobility_domain, MOBILITY_DOMAIN_ID_LEN); + sm->mdie_ft_capab = mobility_domain[MOBILITY_DOMAIN_ID_LEN]; + wpa_printf(MSG_DEBUG, "FT: Capability and Policy: 0x%02x", + sm->mdie_ft_capab); } else if (sm) os_memset(sm->mobility_domain, 0, MOBILITY_DOMAIN_ID_LEN); @@ -229,7 +232,8 @@ static u8 * wpa_ft_gen_req_ies(struct wpa_sm *sm, size_t *len, pos += sizeof(*mdie); os_memcpy(mdie->mobility_domain, sm->mobility_domain, MOBILITY_DOMAIN_ID_LEN); - mdie->ft_capab = ap_mdie && ap_mdie[1] >= 3 ? ap_mdie[4] : 0; + mdie->ft_capab = ap_mdie && ap_mdie[1] >= 3 ? ap_mdie[4] : + sm->mdie_ft_capab; /* FTIE[SNonce, [R1KH-ID,] R0KH-ID ] */ ftie_pos = pos; diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h index 929b06b1a..ae3b66d85 100644 --- a/src/rsn_supp/wpa_i.h +++ b/src/rsn_supp/wpa_i.h @@ -108,6 +108,7 @@ struct wpa_sm { int over_the_ds_in_progress; u8 target_ap[ETH_ALEN]; /* over-the-DS target AP */ int set_ptk_after_assoc; + u8 mdie_ft_capab; /* FT Capability and Policy from target AP MDIE */ #endif /* CONFIG_IEEE80211R */ }; diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 814837549..800731db5 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -178,7 +178,7 @@ void sme_authenticate(struct wpa_supplicant *wpa_s, mdie = (struct rsn_mdie *) pos; os_memcpy(mdie->mobility_domain, md, MOBILITY_DOMAIN_ID_LEN); - mdie->ft_capab = 0; + mdie->ft_capab = md[MOBILITY_DOMAIN_ID_LEN]; wpa_s->sme.assoc_req_ie_len += 5; }