SAE: Testing option to ignore H2E requirement mismatch
"SET ignore_sae_h2e_only 1" can now be used to configurate wpa_supplicant to a test mode where it ignores AP's H2E-required advertisement and try to connect with hunt-and-pecking loop instead. This is used only for testing AP behavior with unexpected STA behavior. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
23acdd9f33
commit
405946d76a
3 changed files with 11 additions and 0 deletions
|
@ -663,6 +663,8 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
|
||||||
wpa_s->ignore_assoc_disallow = !!atoi(value);
|
wpa_s->ignore_assoc_disallow = !!atoi(value);
|
||||||
wpa_drv_ignore_assoc_disallow(wpa_s,
|
wpa_drv_ignore_assoc_disallow(wpa_s,
|
||||||
wpa_s->ignore_assoc_disallow);
|
wpa_s->ignore_assoc_disallow);
|
||||||
|
} else if (os_strcasecmp(cmd, "ignore_sae_h2e_only") == 0) {
|
||||||
|
wpa_s->ignore_sae_h2e_only = !!atoi(value);
|
||||||
} else if (os_strcasecmp(cmd, "reject_btm_req_reason") == 0) {
|
} else if (os_strcasecmp(cmd, "reject_btm_req_reason") == 0) {
|
||||||
wpa_s->reject_btm_req_reason = atoi(value);
|
wpa_s->reject_btm_req_reason = atoi(value);
|
||||||
} else if (os_strcasecmp(cmd, "get_pref_freq_list_override") == 0) {
|
} else if (os_strcasecmp(cmd, "get_pref_freq_list_override") == 0) {
|
||||||
|
@ -8045,6 +8047,7 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
|
||||||
wpa_s->ignore_auth_resp = 0;
|
wpa_s->ignore_auth_resp = 0;
|
||||||
wpa_s->ignore_assoc_disallow = 0;
|
wpa_s->ignore_assoc_disallow = 0;
|
||||||
wpa_s->testing_resend_assoc = 0;
|
wpa_s->testing_resend_assoc = 0;
|
||||||
|
wpa_s->ignore_sae_h2e_only = 0;
|
||||||
wpa_s->reject_btm_req_reason = 0;
|
wpa_s->reject_btm_req_reason = 0;
|
||||||
wpa_sm_set_test_assoc_ie(wpa_s->wpa, NULL);
|
wpa_sm_set_test_assoc_ie(wpa_s->wpa, NULL);
|
||||||
os_free(wpa_s->get_pref_freq_list_override);
|
os_free(wpa_s->get_pref_freq_list_override);
|
||||||
|
|
|
@ -857,6 +857,13 @@ static int rate_match(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
if (debug_print)
|
if (debug_print)
|
||||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||||
" SAE H2E disabled");
|
" SAE H2E disabled");
|
||||||
|
#ifdef CONFIG_TESTING_OPTIONS
|
||||||
|
if (wpa_s->ignore_sae_h2e_only) {
|
||||||
|
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||||
|
"TESTING: Ignore SAE H2E requirement mismatch");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_TESTING_OPTIONS */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -1117,6 +1117,7 @@ struct wpa_supplicant {
|
||||||
unsigned int ignore_auth_resp:1;
|
unsigned int ignore_auth_resp:1;
|
||||||
unsigned int ignore_assoc_disallow:1;
|
unsigned int ignore_assoc_disallow:1;
|
||||||
unsigned int testing_resend_assoc:1;
|
unsigned int testing_resend_assoc:1;
|
||||||
|
unsigned int ignore_sae_h2e_only:1;
|
||||||
struct wpabuf *sae_commit_override;
|
struct wpabuf *sae_commit_override;
|
||||||
enum wpa_alg last_tk_alg;
|
enum wpa_alg last_tk_alg;
|
||||||
u8 last_tk_addr[ETH_ALEN];
|
u8 last_tk_addr[ETH_ALEN];
|
||||||
|
|
Loading…
Reference in a new issue