Add support for not transmitting EAPOL-Key group msg 2/2
To support the STA testbed role, the STA has to disable transmitting EAPOL-Key group msg 2/2 of Group Key Handshake. Add test parameter to disable sending EAPOL-Key group msg 2/2 of Group Key Handshake. Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
This commit is contained in:
parent
d27f7bd946
commit
b746cb28bc
6 changed files with 21 additions and 0 deletions
|
@ -2023,6 +2023,13 @@ static int wpa_supplicant_send_2_of_2(struct wpa_sm *sm,
|
|||
u8 *rbuf, *key_mic;
|
||||
size_t kde_len = 0;
|
||||
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (sm->disable_eapol_g2_tx) {
|
||||
wpa_printf(MSG_INFO, "TEST: Disable sending EAPOL-Key 2/2");
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
#ifdef CONFIG_OCV
|
||||
if (wpa_sm_ocv_enabled(sm))
|
||||
kde_len = OCV_OCI_KDE_LEN;
|
||||
|
@ -3380,6 +3387,9 @@ int wpa_sm_set_param(struct wpa_sm *sm, enum wpa_sm_conf_params param,
|
|||
case WPA_PARAM_OCI_FREQ_FILS_ASSOC:
|
||||
sm->oci_freq_override_fils_assoc = value;
|
||||
break;
|
||||
case WPA_PARAM_DISABLE_EAPOL_G2_TX:
|
||||
sm->disable_eapol_g2_tx = value;
|
||||
break;
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
#ifdef CONFIG_DPP2
|
||||
case WPA_PARAM_DPP_PFS:
|
||||
|
|
|
@ -118,6 +118,7 @@ enum wpa_sm_conf_params {
|
|||
WPA_PARAM_OCI_FREQ_EAPOL_G2,
|
||||
WPA_PARAM_OCI_FREQ_FT_ASSOC,
|
||||
WPA_PARAM_OCI_FREQ_FILS_ASSOC,
|
||||
WPA_PARAM_DISABLE_EAPOL_G2_TX,
|
||||
};
|
||||
|
||||
struct rsn_supp_config {
|
||||
|
|
|
@ -185,6 +185,7 @@ struct wpa_sm {
|
|||
unsigned int oci_freq_override_eapol_g2;
|
||||
unsigned int oci_freq_override_ft_assoc;
|
||||
unsigned int oci_freq_override_fils_assoc;
|
||||
unsigned int disable_eapol_g2_tx;
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
#ifdef CONFIG_FILS
|
||||
|
|
|
@ -837,6 +837,11 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
|
|||
wpa_s->disable_scs_support = !!atoi(value);
|
||||
} else if (os_strcasecmp(cmd, "disable_mscs_support") == 0) {
|
||||
wpa_s->disable_mscs_support = !!atoi(value);
|
||||
} else if (os_strcasecmp(cmd, "disable_eapol_g2_tx") == 0) {
|
||||
wpa_s->disable_eapol_g2_tx = !!atoi(value);
|
||||
/* Populate value to wpa_sm if already associated. */
|
||||
wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_DISABLE_EAPOL_G2_TX,
|
||||
wpa_s->disable_eapol_g2_tx);
|
||||
#ifdef CONFIG_DPP
|
||||
} else if (os_strcasecmp(cmd, "dpp_config_obj_override") == 0) {
|
||||
os_free(wpa_s->dpp_config_obj_override);
|
||||
|
@ -8540,6 +8545,7 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
|
|||
wpa_s->oci_freq_override_ft_assoc = 0;
|
||||
wpa_s->oci_freq_override_fils_assoc = 0;
|
||||
wpa_s->oci_freq_override_wnm_sleep = 0;
|
||||
wpa_s->disable_eapol_g2_tx = 0;
|
||||
#ifdef CONFIG_DPP
|
||||
os_free(wpa_s->dpp_config_obj_override);
|
||||
wpa_s->dpp_config_obj_override = NULL;
|
||||
|
|
|
@ -1701,6 +1701,8 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
|
|||
wpa_s->oci_freq_override_ft_assoc);
|
||||
wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_OCI_FREQ_FILS_ASSOC,
|
||||
wpa_s->oci_freq_override_fils_assoc);
|
||||
wpa_sm_set_param(wpa_s->wpa, WPA_PARAM_DISABLE_EAPOL_G2_TX,
|
||||
wpa_s->disable_eapol_g2_tx);
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
/* Extended Key ID is only supported in infrastructure BSS so far */
|
||||
|
|
|
@ -1343,6 +1343,7 @@ struct wpa_supplicant {
|
|||
unsigned int oci_freq_override_ft_assoc;
|
||||
unsigned int oci_freq_override_fils_assoc;
|
||||
unsigned int oci_freq_override_wnm_sleep;
|
||||
unsigned int disable_eapol_g2_tx;
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
struct wmm_ac_assoc_data *wmm_ac_assoc_info;
|
||||
|
|
Loading…
Add table
Reference in a new issue