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.
This commit is contained in:
parent
6c6ad81f9c
commit
01b397dd94
2 changed files with 21 additions and 6 deletions
|
@ -156,8 +156,13 @@ static void rx_data_bss_prot_group(struct wlantest *wt,
|
||||||
else
|
else
|
||||||
ccmp_get_pn(pn, data);
|
ccmp_get_pn(pn, data);
|
||||||
if (os_memcmp(pn, bss->rsc[keyid], 6) <= 0) {
|
if (os_memcmp(pn, bss->rsc[keyid], 6) <= 0) {
|
||||||
wpa_printf(MSG_INFO, "CCMP/TKIP replay detected: SA=" MACSTR,
|
u16 seq_ctrl = le_to_host16(hdr->seq_ctrl);
|
||||||
MAC2STR(hdr->addr2));
|
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, "RX PN", pn, 6);
|
||||||
wpa_hexdump(MSG_INFO, "RSC", bss->rsc[keyid], 6);
|
wpa_hexdump(MSG_INFO, "RSC", bss->rsc[keyid], 6);
|
||||||
}
|
}
|
||||||
|
@ -296,8 +301,13 @@ static void rx_data_bss_prot(struct wlantest *wt,
|
||||||
else
|
else
|
||||||
ccmp_get_pn(pn, data);
|
ccmp_get_pn(pn, data);
|
||||||
if (os_memcmp(pn, rsc, 6) <= 0) {
|
if (os_memcmp(pn, rsc, 6) <= 0) {
|
||||||
wpa_printf(MSG_INFO, "CCMP/TKIP replay detected: SA=" MACSTR,
|
u16 seq_ctrl = le_to_host16(hdr->seq_ctrl);
|
||||||
MAC2STR(hdr->addr2));
|
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, "RX PN", pn, 6);
|
||||||
wpa_hexdump(MSG_INFO, "RSC", rsc, 6);
|
wpa_hexdump(MSG_INFO, "RSC", rsc, 6);
|
||||||
}
|
}
|
||||||
|
|
|
@ -881,8 +881,13 @@ static u8 * mgmt_ccmp_decrypt(struct wlantest *wt, const u8 *data, size_t len,
|
||||||
|
|
||||||
ccmp_get_pn(pn, data + 24);
|
ccmp_get_pn(pn, data + 24);
|
||||||
if (os_memcmp(pn, rsc, 6) <= 0) {
|
if (os_memcmp(pn, rsc, 6) <= 0) {
|
||||||
wpa_printf(MSG_INFO, "CCMP/TKIP replay detected: SA=" MACSTR,
|
u16 seq_ctrl = le_to_host16(hdr->seq_ctrl);
|
||||||
MAC2STR(hdr->addr2));
|
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, "RX PN", pn, 6);
|
||||||
wpa_hexdump(MSG_INFO, "RSC", rsc, 6);
|
wpa_hexdump(MSG_INFO, "RSC", rsc, 6);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue