aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2020-04-03 20:56:10 (GMT)
committerJouni Malinen <j@w1.fi>2020-04-03 20:56:10 (GMT)
commit866c3acb8cce8806d0b40393a407347e1b9add32 (patch)
tree9a2ece20396bac1f67235ee30c22a2e638da2cec /wlantest
parentca70f36c20db0776a9776ad99517f459fd3532f8 (diff)
downloadhostap-866c3acb8cce8806d0b40393a407347e1b9add32.zip
hostap-866c3acb8cce8806d0b40393a407347e1b9add32.tar.gz
hostap-866c3acb8cce8806d0b40393a407347e1b9add32.tar.bz2
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>
Diffstat (limited to 'wlantest')
-rw-r--r--wlantest/rx_data.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/wlantest/rx_data.c b/wlantest/rx_data.c
index fa8df77..e8160c3 100644
--- a/wlantest/rx_data.c
+++ b/wlantest/rx_data.c
@@ -260,8 +260,9 @@ static void rx_data_bss_prot_group(struct wlantest *wt,
check_plaintext_prot(wt, hdr, data, len);
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 "
"(A2=" MACSTR " KeyID=%d)",
MAC2STR(hdr->addr2), keyid);