wlantest: Do not report decryption failures for WEP keys if no keys

If no WEP keys are available, there is not going to be an attempt to
decrypt the frame, so don't claim decryption failed.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2020-04-03 23:56:10 +03:00
parent ca70f36c20
commit 866c3acb8c

View File

@ -260,8 +260,9 @@ static void rx_data_bss_prot_group(struct wlantest *wt,
check_plaintext_prot(wt, hdr, data, len); check_plaintext_prot(wt, hdr, data, len);
keyid = data[3] >> 6; keyid = data[3] >> 6;
if (bss->gtk_len[keyid] == 0 && bss->group_cipher != WPA_CIPHER_WEP40) if (bss->gtk_len[keyid] == 0 &&
{ (bss->group_cipher != WPA_CIPHER_WEP40 ||
dl_list_empty(&wt->wep))) {
add_note(wt, MSG_MSGDUMP, "No GTK known to decrypt the frame " add_note(wt, MSG_MSGDUMP, "No GTK known to decrypt the frame "
"(A2=" MACSTR " KeyID=%d)", "(A2=" MACSTR " KeyID=%d)",
MAC2STR(hdr->addr2), keyid); MAC2STR(hdr->addr2), keyid);