From 30e2a2152edad8e30411599e0fd9c113ac12eff3 Mon Sep 17 00:00:00 2001 From: Gokul Sivakumar Date: Tue, 13 Jul 2021 21:13:25 +0530 Subject: IEEE 802.11: include the "TA" field while printing Block Ack Control frame As per the IEEE 802.11-2016 std, section 9.3.1.9, Fig 9-32, the Block Ack control frame has the Transmitter Address field. So include this TA field when printing the BA frame to stdout if the "eflag" is enabled. --- print-802_11.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'print-802_11.c') diff --git a/print-802_11.c b/print-802_11.c index d2f0f35b..7864fb27 100644 --- a/print-802_11.c +++ b/print-802_11.c @@ -362,9 +362,11 @@ struct ctrl_ba_hdr_t { nd_uint16_t fc; nd_uint16_t duration; nd_mac_addr ra; + nd_mac_addr ta; }; -#define CTRL_BA_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN) +#define CTRL_BA_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\ + IEEE802_11_RA_LEN+IEEE802_11_TA_LEN) struct ctrl_bar_hdr_t { nd_uint16_t fc; @@ -2019,8 +2021,9 @@ ctrl_header_print(netdissect_options *ndo, uint16_t fc, const u_char *p) GET_LE_U_2(((const struct ctrl_bar_hdr_t *)p)->seq)); break; case CTRL_BA: - ND_PRINT("RA:%s ", - GET_ETHERADDR_STRING(((const struct ctrl_ba_hdr_t *)p)->ra)); + ND_PRINT("RA:%s TA:%s ", + GET_ETHERADDR_STRING(((const struct ctrl_ba_hdr_t *)p)->ra), + GET_ETHERADDR_STRING(((const struct ctrl_ba_hdr_t *)p)->ta)); break; case CTRL_PS_POLL: ND_PRINT("BSSID:%s TA:%s ", -- cgit v1.2.1