From: Jouni Malinen Date: Wed, 7 May 2025 15:45:07 +0000 (+0300) Subject: wlantest: Log frame number for Management frames and EAPOL frames X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2ed404cafdf66e9f28aef6558ccb6ef8593cf1e;p=thirdparty%2Fhostap.git wlantest: Log frame number for Management frames and EAPOL frames This makes it easier to find the frame from a capture file if needing to manual inspectation of the details. Signed-off-by: Jouni Malinen --- diff --git a/wlantest/rx_eapol.c b/wlantest/rx_eapol.c index dd58ae521..75e29863d 100644 --- a/wlantest/rx_eapol.c +++ b/wlantest/rx_eapol.c @@ -1683,9 +1683,9 @@ void rx_data_eapol(struct wlantest *wt, const u8 *bssid, const u8 *sta_addr, hdr = (const struct ieee802_1x_hdr *) data; length = be_to_host16(hdr->length); wpa_printf(MSG_DEBUG, "RX EAPOL: " MACSTR " -> " MACSTR "%s ver=%u " - "type=%u len=%u", + "type=%u len=%u #%u", MAC2STR(src), MAC2STR(dst), prot ? " Prot" : "", - hdr->version, hdr->type, length); + hdr->version, hdr->type, length, wt->frame_num); if (hdr->version < 1 || hdr->version > 3) { wpa_printf(MSG_INFO, "Unexpected EAPOL version %u from " MACSTR, hdr->version, MAC2STR(src)); diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c index 1c9309488..47dbc6009 100644 --- a/wlantest/rx_mgmt.c +++ b/wlantest/rx_mgmt.c @@ -3950,12 +3950,13 @@ void rx_mgmt(struct wlantest *wt, const u8 *data, size_t len) stype == WLAN_FC_STYPE_PROBE_RESP || stype == WLAN_FC_STYPE_PROBE_REQ) ? MSG_EXCESSIVE : MSG_MSGDUMP, - "MGMT %s%s%s DA=" MACSTR " SA=" MACSTR " BSSID=" MACSTR, + "MGMT %s%s%s DA=" MACSTR " SA=" MACSTR " BSSID=" MACSTR + " #%u", mgmt_stype(stype), fc & WLAN_FC_PWRMGT ? " PwrMgt" : "", fc & WLAN_FC_ISWEP ? " Prot" : "", MAC2STR(hdr->addr1), MAC2STR(hdr->addr2), - MAC2STR(hdr->addr3)); + MAC2STR(hdr->addr3), wt->frame_num); if ((fc & WLAN_FC_ISWEP) && !(hdr->addr1[0] & 0x01) &&