SAE H2E: Fix RSNXE override in EAPOL-Key msg 2/4 for testing purposes
The previous implementation missed the case where EAPOL-Key frame may be
reported as having been received before the association event is
processed. This would have resulted in not using the RSNXE override for
EAPOL-Key msg 2/4 when the pending EAPOL-Key frame gets processed
immediately after processing the association event. Fix this by moving
the override case to be handled before that.
Fixes: 1325655397
("SAE H2E: RSNXE override for testing purposes")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
fb3ef06dde
commit
e3c476bd8c
1 changed files with 10 additions and 10 deletions
|
@ -2946,6 +2946,16 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
|
|||
|
||||
wpa_s->last_eapol_matches_bssid = 0;
|
||||
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (wpa_s->rsnxe_override_eapol) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"TESTING: RSNXE EAPOL-Key msg 2/4 override");
|
||||
wpa_sm_set_assoc_rsnxe(wpa_s->wpa,
|
||||
wpabuf_head(wpa_s->rsnxe_override_eapol),
|
||||
wpabuf_len(wpa_s->rsnxe_override_eapol));
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
if (wpa_s->pending_eapol_rx) {
|
||||
struct os_reltime now, age;
|
||||
os_get_reltime(&now);
|
||||
|
@ -3017,16 +3027,6 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
|
|||
#ifdef CONFIG_MBO
|
||||
wpas_mbo_check_pmf(wpa_s, bss, wpa_s->current_ssid);
|
||||
#endif /* CONFIG_MBO */
|
||||
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (wpa_s->rsnxe_override_eapol) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"TESTING: RSNXE EAPOL-Key msg 2/4 override");
|
||||
wpa_sm_set_assoc_rsnxe(wpa_s->wpa,
|
||||
wpabuf_head(wpa_s->rsnxe_override_eapol),
|
||||
wpabuf_len(wpa_s->rsnxe_override_eapol));
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue