]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Add frame number fo replay detected messages
authorJouni Malinen <j@w1.fi>
Fri, 3 Apr 2020 21:06:59 +0000 (00:06 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 3 Apr 2020 21:06:59 +0000 (00:06 +0300)
This makes it easier to find the relevant frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
wlantest/rx_data.c

index ef85e46e3c76900aed9e7a5edf6f7cb9341527c9..b632013a8534f58e8e91e8c2f003e8ae3799f81a 100644 (file)
@@ -283,14 +283,14 @@ static void rx_data_bss_prot_group(struct wlantest *wt,
                wpa_snprintf_hex(rsc_hex, sizeof(rsc_hex), bss->rsc[keyid], 6);
                add_note(wt, MSG_INFO, "replay detected: A1=" MACSTR
                         " A2=" MACSTR " A3=" MACSTR
-                        " seq=%u frag=%u%s keyid=%d %s<=%s",
+                        " seq=%u frag=%u%s keyid=%d #%u %s<=%s",
                         MAC2STR(hdr->addr1), MAC2STR(hdr->addr2),
                         MAC2STR(hdr->addr3),
                         WLAN_GET_SEQ_SEQ(seq_ctrl),
                         WLAN_GET_SEQ_FRAG(seq_ctrl),
                         (le_to_host16(hdr->frame_control) & WLAN_FC_RETRY) ?
                         " Retry" : "",
-                        keyid, pn_hex, rsc_hex);
+                        keyid, wt->frame_num, pn_hex, rsc_hex);
                replay = 1;
        }
 
@@ -552,14 +552,14 @@ static void rx_data_bss_prot(struct wlantest *wt,
                wpa_snprintf_hex(rsc_hex, sizeof(rsc_hex), rsc, 6);
                add_note(wt, MSG_INFO, "replay detected: A1=" MACSTR
                         " A2=" MACSTR " A3=" MACSTR
-                        " seq=%u frag=%u%s keyid=%d tid=%d %s<=%s",
+                        " seq=%u frag=%u%s keyid=%d tid=%d #%u %s<=%s",
                         MAC2STR(hdr->addr1), MAC2STR(hdr->addr2),
                         MAC2STR(hdr->addr3),
                         WLAN_GET_SEQ_SEQ(seq_ctrl),
                         WLAN_GET_SEQ_FRAG(seq_ctrl),
                         (le_to_host16(hdr->frame_control) &  WLAN_FC_RETRY) ?
                         " Retry" : "",
-                        keyid, tid, pn_hex, rsc_hex);
+                        keyid, tid, wt->frame_num, pn_hex, rsc_hex);
                replay = 1;
        }