FT: Testing override for RSNXE Used subfield in FTE
Allow wpa_supplicant to be requested to override the RSNXE Used subfield in FT reassociation case for testing purposes with "SET ft_rsnxe_used <0/1/2>" where 0 = no override, 1 = override to 1, and 2 = override to 0. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
5344af7d22
commit
b2d8dc59f4
7 changed files with 22 additions and 0 deletions
|
@ -3252,6 +3252,11 @@ int wpa_sm_set_param(struct wpa_sm *sm, enum wpa_sm_conf_params param,
|
|||
case WPA_PARAM_USE_EXT_KEY_ID:
|
||||
sm->use_ext_key_id = value;
|
||||
break;
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
case WPA_PARAM_FT_RSNXE_USED:
|
||||
sm->ft_rsnxe_used = value;
|
||||
break;
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -106,6 +106,7 @@ enum wpa_sm_conf_params {
|
|||
WPA_PARAM_DENY_PTK0_REKEY,
|
||||
WPA_PARAM_EXT_KEY_ID,
|
||||
WPA_PARAM_USE_EXT_KEY_ID,
|
||||
WPA_PARAM_FT_RSNXE_USED,
|
||||
};
|
||||
|
||||
struct rsn_supp_config {
|
||||
|
|
|
@ -305,6 +305,13 @@ static u8 * wpa_ft_gen_req_ies(struct wpa_sm *sm, size_t *len,
|
|||
ftie_len = pos++;
|
||||
rsnxe_used = wpa_key_mgmt_sae(sm->key_mgmt) && anonce &&
|
||||
(sm->sae_pwe == 1 || sm->sae_pwe == 2);
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (anonce && sm->ft_rsnxe_used) {
|
||||
rsnxe_used = sm->ft_rsnxe_used == 1;
|
||||
wpa_printf(MSG_DEBUG, "TESTING: FT: Force RSNXE Used %d",
|
||||
rsnxe_used);
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
if (wpa_key_mgmt_sha384(sm->key_mgmt)) {
|
||||
struct rsn_ftie_sha384 *ftie;
|
||||
|
||||
|
|
|
@ -153,6 +153,7 @@ struct wpa_sm {
|
|||
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
struct wpabuf *test_assoc_ie;
|
||||
int ft_rsnxe_used;
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
#ifdef CONFIG_FILS
|
||||
|
|
|
@ -747,6 +747,8 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
|
|||
break;
|
||||
pos++;
|
||||
}
|
||||
} else if (os_strcasecmp(cmd, "ft_rsnxe_used") == 0) {
|
||||
wpa_s->ft_rsnxe_used = atoi(value);
|
||||
} else if (os_strcasecmp(cmd, "rsne_override_eapol") == 0) {
|
||||
wpabuf_free(wpa_s->rsne_override_eapol);
|
||||
if (os_strcmp(value, "NULL") == 0)
|
||||
|
@ -8184,6 +8186,7 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
|
|||
wpa_s->disable_sa_query = 0;
|
||||
wpa_s->testing_resend_assoc = 0;
|
||||
wpa_s->ignore_sae_h2e_only = 0;
|
||||
wpa_s->ft_rsnxe_used = 0;
|
||||
wpa_s->reject_btm_req_reason = 0;
|
||||
wpa_sm_set_test_assoc_ie(wpa_s->wpa, NULL);
|
||||
os_free(wpa_s->get_pref_freq_list_override);
|
||||
|
|
|
@ -1639,6 +1639,10 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
|
|||
if (ssid->sae_password_id && sae_pwe != 3)
|
||||
sae_pwe = 1;
|
||||
wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_SAE_PWE, sae_pwe);
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_FT_RSNXE_USED,
|
||||
wpa_s->ft_rsnxe_used);
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
/* Extended Key ID is only supported in infrastructure BSS so far */
|
||||
if (ssid->mode == WPAS_MODE_INFRA && wpa_s->conf->extended_key_id &&
|
||||
|
|
|
@ -1135,6 +1135,7 @@ struct wpa_supplicant {
|
|||
unsigned int disable_sa_query:1;
|
||||
unsigned int testing_resend_assoc:1;
|
||||
unsigned int ignore_sae_h2e_only:1;
|
||||
int ft_rsnxe_used;
|
||||
struct wpabuf *sae_commit_override;
|
||||
enum wpa_alg last_tk_alg;
|
||||
u8 last_tk_addr[ETH_ALEN];
|
||||
|
|
Loading…
Reference in a new issue