@@ -2521,6 +2521,18 @@ static u8 * wpa_ft_process_ric(struct wpa_state_machine *sm, u8 *pos, u8 *end,
}
+/* A STA that uses the base RSNE compares RSNXE Used with the RSNXE of the
+ * Beacon and Probe Response frames, and rejects the bit when those frames
+ * carry no RSNXE. RSN Overriding keeps the bit as before. */
+static bool wpa_ft_rsnxe_used_allowed(struct wpa_state_machine *sm)
+{
+ if (sm->rsn_override || sm->rsn_override_2)
+ return true;
+ return get_ie(sm->wpa_auth->wpa_ie, sm->wpa_auth->wpa_ie_len,
+ WLAN_EID_RSNX) != NULL;
+}
+
+
u8 * wpa_sm_write_assoc_resp_ies(struct wpa_state_machine *sm, u8 *pos,
size_t max_len, int auth_alg,
const u8 *req_ies, size_t req_ies_len,
@@ -2716,7 +2728,8 @@ u8 * wpa_sm_write_assoc_resp_ies(struct wpa_state_machine *sm, u8 *pos,
}
rsnxe_used = (auth_alg == WLAN_AUTH_FT) &&
(conf->sae_pwe == SAE_PWE_HASH_TO_ELEMENT ||
- conf->sae_pwe == SAE_PWE_BOTH);
+ conf->sae_pwe == SAE_PWE_BOTH) &&
+ wpa_ft_rsnxe_used_allowed(sm);
#ifdef CONFIG_TESTING_OPTIONS
if (sm->wpa_auth->conf.ft_rsnxe_used) {
rsnxe_used = sm->wpa_auth->conf.ft_rsnxe_used == 1;