aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-11-23 13:16:23 +0200
committerJouni Malinen <j@w1.fi>2010-11-23 13:16:23 +0200
commit107ad4e3233c44dba57b3de335af7f53c7f56c60 (patch)
treee11664fc9b54d851cd807caddd202d08b3ecb58b /wlantest
parentf665867bd13212b6a025e4cf37981515b0f28a61 (diff)
downloadexternal_wpa_supplicant_8_ti-107ad4e3233c44dba57b3de335af7f53c7f56c60.zip
external_wpa_supplicant_8_ti-107ad4e3233c44dba57b3de335af7f53c7f56c60.tar.gz
external_wpa_supplicant_8_ti-107ad4e3233c44dba57b3de335af7f53c7f56c60.tar.bz2
wlantest: Show broadcast Deauth/Disassoc info in debug
Diffstat (limited to 'wlantest')
-rw-r--r--wlantest/rx_mgmt.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c
index 1e94a6c..bf9750e 100644
--- a/wlantest/rx_mgmt.c
+++ b/wlantest/rx_mgmt.c
@@ -171,8 +171,6 @@ static void rx_mgmt_deauth(struct wlantest *wt, const u8 *data, size_t len,
sta = sta_get(bss, mgmt->da);
else
sta = sta_get(bss, mgmt->sa);
- if (sta == NULL)
- return;
if (len < 24 + 2) {
wpa_printf(MSG_INFO, "Too short Deauthentication frame from "
@@ -181,11 +179,14 @@ static void rx_mgmt_deauth(struct wlantest *wt, const u8 *data, size_t len,
}
wpa_printf(MSG_DEBUG, "DEAUTH " MACSTR " -> " MACSTR
- " (reason=%u)",
+ " (reason=%u) (valid=%d)",
MAC2STR(mgmt->sa), MAC2STR(mgmt->da),
- le_to_host16(mgmt->u.deauth.reason_code));
+ le_to_host16(mgmt->u.deauth.reason_code), valid);
wpa_hexdump(MSG_MSGDUMP, "DEAUTH payload", data + 24, len - 24);
+ if (sta == NULL)
+ return;
+
if (os_memcmp(mgmt->sa, mgmt->bssid, ETH_ALEN) == 0)
sta->counters[valid ? WLANTEST_STA_COUNTER_VALID_DEAUTH_RX :
WLANTEST_STA_COUNTER_INVALID_DEAUTH_RX]++;
@@ -478,8 +479,6 @@ static void rx_mgmt_disassoc(struct wlantest *wt, const u8 *data, size_t len,
sta = sta_get(bss, mgmt->da);
else
sta = sta_get(bss, mgmt->sa);
- if (sta == NULL)
- return;
if (len < 24 + 2) {
wpa_printf(MSG_INFO, "Too short Disassociation frame from "
@@ -488,11 +487,14 @@ static void rx_mgmt_disassoc(struct wlantest *wt, const u8 *data, size_t len,
}
wpa_printf(MSG_DEBUG, "DISASSOC " MACSTR " -> " MACSTR
- " (reason=%u)",
+ " (reason=%u) (valid=%d)",
MAC2STR(mgmt->sa), MAC2STR(mgmt->da),
- le_to_host16(mgmt->u.disassoc.reason_code));
+ le_to_host16(mgmt->u.disassoc.reason_code), valid);
wpa_hexdump(MSG_MSGDUMP, "DISASSOC payload", data + 24, len - 24);
+ if (sta == NULL)
+ return;
+
if (os_memcmp(mgmt->sa, mgmt->bssid, ETH_ALEN) == 0)
sta->counters[valid ? WLANTEST_STA_COUNTER_VALID_DISASSOC_RX :
WLANTEST_STA_COUNTER_INVALID_DISASSOC_RX]++;