]> The Tcpdump Group git mirrors - tcpdump/commitdiff
IEEE 802.11: include the "TA" field while printing Block Ack Control frame 926/head
authorGokul Sivakumar <[email protected]>
Tue, 13 Jul 2021 15:43:25 +0000 (21:13 +0530)
committerGokul Sivakumar <[email protected]>
Wed, 28 Jul 2021 15:32:19 +0000 (21:02 +0530)
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

index d2f0f35b8eef7a8b264eff33353758468cf154f0..7864fb275180860e5223ad8944898ce8566f76af 100644 (file)
@@ -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 ",