aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/rx_data.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2011-01-07 12:17:08 (GMT)
committerJouni Malinen <j@w1.fi>2011-01-07 12:17:08 (GMT)
commit01b397dd9433dd3fb48af00573157b364439161a (patch)
treecd4cf9c3c83497d8a3dc86577eed8343130c05a2 /wlantest/rx_data.c
parent6c6ad81f9c46d8e1d958feaa38fa105b186ee861 (diff)
downloadhostap-01b397dd9433dd3fb48af00573157b364439161a.zip
hostap-01b397dd9433dd3fb48af00573157b364439161a.tar.gz
hostap-01b397dd9433dd3fb48af00573157b364439161a.tar.bz2
wlantest: Add more details for replay debug messages
These make it easier to find the frame in question when looking at the capture in Wireshark.
Diffstat (limited to 'wlantest/rx_data.c')
-rw-r--r--wlantest/rx_data.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/wlantest/rx_data.c b/wlantest/rx_data.c
index 0d74b08..fc264ac 100644
--- a/wlantest/rx_data.c
+++ b/wlantest/rx_data.c
@@ -156,8 +156,13 @@ static void rx_data_bss_prot_group(struct wlantest *wt,
else
ccmp_get_pn(pn, data);
if (os_memcmp(pn, bss->rsc[keyid], 6) <= 0) {
- wpa_printf(MSG_INFO, "CCMP/TKIP replay detected: SA=" MACSTR,
- MAC2STR(hdr->addr2));
+ u16 seq_ctrl = le_to_host16(hdr->seq_ctrl);
+ wpa_printf(MSG_INFO, "CCMP/TKIP replay detected: A1=" MACSTR
+ " A2=" MACSTR " A3=" MACSTR " seq=%u frag=%u",
+ MAC2STR(hdr->addr1), MAC2STR(hdr->addr2),
+ MAC2STR(hdr->addr3),
+ WLAN_GET_SEQ_SEQ(seq_ctrl),
+ WLAN_GET_SEQ_FRAG(seq_ctrl));
wpa_hexdump(MSG_INFO, "RX PN", pn, 6);
wpa_hexdump(MSG_INFO, "RSC", bss->rsc[keyid], 6);
}
@@ -296,8 +301,13 @@ static void rx_data_bss_prot(struct wlantest *wt,
else
ccmp_get_pn(pn, data);
if (os_memcmp(pn, rsc, 6) <= 0) {
- wpa_printf(MSG_INFO, "CCMP/TKIP replay detected: SA=" MACSTR,
- MAC2STR(hdr->addr2));
+ u16 seq_ctrl = le_to_host16(hdr->seq_ctrl);
+ wpa_printf(MSG_INFO, "CCMP/TKIP replay detected: A1=" MACSTR
+ " A2=" MACSTR " A3=" MACSTR " seq=%u frag=%u",
+ MAC2STR(hdr->addr1), MAC2STR(hdr->addr2),
+ MAC2STR(hdr->addr3),
+ WLAN_GET_SEQ_SEQ(seq_ctrl),
+ WLAN_GET_SEQ_FRAG(seq_ctrl));
wpa_hexdump(MSG_INFO, "RX PN", pn, 6);
wpa_hexdump(MSG_INFO, "RSC", rsc, 6);
}