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:
Veerendranath Jakkam 2022-02-28 16:57:37 +05:30 committed by Jouni Malinen
parent d27f7bd946
commit b746cb28bc
6 changed files with 21 additions and 0 deletions

View file

@ -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:

View file

@ -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 {

View file

@ -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