wlantest: Store and check SNonce/ANonce for FT Authentication
Store SNonce and ANonce from FT Authentication frames during FT over-the-air so that these values are available for processing the FT reassociation frames. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
8cf919ffd5
commit
d12a3dce82
1 changed files with 14 additions and 0 deletions
|
@ -537,12 +537,26 @@ static void process_ft_auth(struct wlantest *wt, struct wlantest_bss *bss,
|
|||
if (trans == 1) {
|
||||
sta->key_mgmt = parse.key_mgmt;
|
||||
sta->pairwise_cipher = parse.pairwise_cipher;
|
||||
if (parse.fte_snonce)
|
||||
os_memcpy(sta->snonce, parse.fte_snonce, WPA_NONCE_LEN);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (trans != 2)
|
||||
goto out;
|
||||
|
||||
if (!parse.fte_snonce ||
|
||||
os_memcmp(sta->snonce, parse.fte_snonce, WPA_NONCE_LEN) != 0) {
|
||||
add_note(wt, MSG_INFO, "FT: SNonce mismatch in FTE");
|
||||
wpa_hexdump(MSG_DEBUG, "FT: Received SNonce",
|
||||
parse.fte_snonce, WPA_NONCE_LEN);
|
||||
wpa_hexdump(MSG_DEBUG, "FT: Expected SNonce",
|
||||
sta->snonce, WPA_NONCE_LEN);
|
||||
}
|
||||
|
||||
if (parse.fte_anonce)
|
||||
os_memcpy(sta->anonce, parse.fte_anonce, WPA_NONCE_LEN);
|
||||
|
||||
/* TODO: Should find the latest updated PMK-R0 value here instead
|
||||
* copying the one from the first found matching old STA entry. */
|
||||
dl_list_for_each(old_bss, &wt->bss, struct wlantest_bss, list) {
|
||||
|
|
Loading…
Reference in a new issue