aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/sta.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2011-01-17 17:52:35 (GMT)
committerJouni Malinen <j@w1.fi>2011-01-17 17:52:35 (GMT)
commit2caf69247bf45ffc67054561d3cfbb1816c86e12 (patch)
tree09464f44bf71dda5dba3a23248b5e1d8a7644745 /wlantest/sta.c
parentcbcf92b42f237190b006ca8c3078593a58cbeac6 (diff)
downloadhostap-2caf69247bf45ffc67054561d3cfbb1816c86e12.zip
hostap-2caf69247bf45ffc67054561d3cfbb1816c86e12.tar.gz
hostap-2caf69247bf45ffc67054561d3cfbb1816c86e12.tar.bz2
wlantest: Check WPA/RSN IE match between AssocReq and Beacon
Note unexpected WPA/RSN IE in AssocReq and ignore them if the last Beacon/ProbeResp from the AP is not advertising support for WPA/RSN.
Diffstat (limited to 'wlantest/sta.c')
-rw-r--r--wlantest/sta.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/wlantest/sta.c b/wlantest/sta.c
index 6e012b8..4b5d16d 100644
--- a/wlantest/sta.c
+++ b/wlantest/sta.c
@@ -72,6 +72,22 @@ void sta_update_assoc(struct wlantest_sta *sta, struct ieee802_11_elems *elems)
struct wpa_ie_data data;
struct wlantest_bss *bss = sta->bss;
+ if (elems->wpa_ie && !bss->wpaie[0]) {
+ wpa_printf(MSG_INFO, "WPA IE included in Association Request "
+ "frame from " MACSTR " even though BSS does not "
+ "use WPA - ignore IE",
+ MAC2STR(sta->addr));
+ elems->wpa_ie = NULL;
+ }
+
+ if (elems->rsn_ie && !bss->rsnie[0]) {
+ wpa_printf(MSG_INFO, "RSN IE included in Association Request "
+ "frame from " MACSTR " even though BSS does not "
+ "use RSN - ignore IE",
+ MAC2STR(sta->addr));
+ elems->rsn_ie = NULL;
+ }
+
if (elems->wpa_ie && elems->rsn_ie) {
wpa_printf(MSG_INFO, "Both WPA IE and RSN IE included in "
"Association Request frame from " MACSTR,