Testing functionality to allow EAPOL-Key Reserved field to be set
The new hostapd configuration parameter eapol_key_reserved_random=1 can be used for testing STA/Supplicant functionality to accept a random value in the Reserved field within EAPOL-Key frames. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
2e4c612dd2
commit
296104d35c
6 changed files with 22 additions and 0 deletions
|
@ -725,6 +725,7 @@ struct hostapd_bss_config {
|
|||
struct wpabuf *eapol_m1_elements;
|
||||
struct wpabuf *eapol_m3_elements;
|
||||
bool eapol_m3_no_encrypt;
|
||||
bool eapol_key_reserved_random;
|
||||
int test_assoc_comeback_type;
|
||||
struct wpabuf *presp_elements;
|
||||
|
||||
|
|
|
@ -2067,6 +2067,11 @@ void __wpa_send_eapol(struct wpa_authenticator *wpa_auth,
|
|||
if (key_rsc)
|
||||
os_memcpy(key->key_rsc, key_rsc, WPA_KEY_RSC_LEN);
|
||||
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (conf->eapol_key_reserved_random)
|
||||
random_get_bytes(key->key_id, sizeof(key->key_id));
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
if (kde && !encr) {
|
||||
os_memcpy(key_data, kde, kde_len);
|
||||
WPA_PUT_BE16(key_mic + mic_len, kde_len);
|
||||
|
|
|
@ -266,6 +266,7 @@ struct wpa_auth_config {
|
|||
struct wpabuf *eapol_m1_elements;
|
||||
struct wpabuf *eapol_m3_elements;
|
||||
bool eapol_m3_no_encrypt;
|
||||
bool eapol_key_reserved_random;
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
unsigned int oci_freq_override_eapol_m3;
|
||||
unsigned int oci_freq_override_eapol_g1;
|
||||
|
|
|
@ -236,6 +236,7 @@ static void hostapd_wpa_auth_conf(struct hostapd_bss_config *conf,
|
|||
if (conf->eapol_m3_elements)
|
||||
wconf->eapol_m3_elements = wpabuf_dup(conf->eapol_m3_elements);
|
||||
wconf->eapol_m3_no_encrypt = conf->eapol_m3_no_encrypt;
|
||||
wconf->eapol_key_reserved_random = conf->eapol_key_reserved_random;
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
#ifdef CONFIG_P2P
|
||||
os_memcpy(wconf->ip_addr_go, conf->ip_addr_go, 4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue