aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/sta.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2011-01-14 15:43:17 (GMT)
committerJouni Malinen <j@w1.fi>2011-01-14 15:43:17 (GMT)
commit2e479416d1bfa584eddf7d335cf969ea6fe1f89c (patch)
tree0ef076cbd4031ef46afe8e0eeff30062aaa19be7 /wlantest/sta.c
parent3558c41ee71ff0e34aca47412b33019630c8e922 (diff)
downloadhostap-2e479416d1bfa584eddf7d335cf969ea6fe1f89c.zip
hostap-2e479416d1bfa584eddf7d335cf969ea6fe1f89c.tar.gz
hostap-2e479416d1bfa584eddf7d335cf969ea6fe1f89c.tar.bz2
wlantest: Add support for decrypting WEP frames
Diffstat (limited to 'wlantest/sta.c')
-rw-r--r--wlantest/sta.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/wlantest/sta.c b/wlantest/sta.c
index bfa6ee0..6e012b8 100644
--- a/wlantest/sta.c
+++ b/wlantest/sta.c
@@ -16,6 +16,7 @@
#include "utils/common.h"
#include "common/defs.h"
+#include "common/ieee802_11_defs.h"
#include "common/ieee802_11_common.h"
#include "wlantest.h"
@@ -97,8 +98,16 @@ void sta_update_assoc(struct wlantest_sta *sta, struct ieee802_11_elems *elems)
wpa_printf(MSG_INFO, "Failed to parse WPA IE from "
MACSTR, MAC2STR(sta->addr));
}
- } else
+ } else {
sta->rsnie[0] = 0;
+ sta->proto = 0;
+ sta->pairwise_cipher = 0;
+ sta->key_mgmt = 0;
+ sta->rsn_capab = 0;
+ if (sta->assocreq_capab_info & WLAN_CAPABILITY_PRIVACY)
+ sta->pairwise_cipher = WPA_CIPHER_WEP40;
+ goto skip_rsn_wpa;
+ }
sta->proto = data.proto;
sta->pairwise_cipher = data.pairwise_cipher;
@@ -130,6 +139,7 @@ void sta_update_assoc(struct wlantest_sta *sta, struct ieee802_11_elems *elems)
"MFPR", MAC2STR(sta->addr), MAC2STR(bss->bssid));
}
+skip_rsn_wpa:
wpa_printf(MSG_INFO, "STA " MACSTR
" proto=%s%s%s"
"pairwise=%s%s%s%s"