]> The Tcpdump Group git mirrors - tcpdump/commitdiff
IEEE 802.11: Update the link-layer header length in two steps (PRISM)
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 2 Aug 2020 08:48:50 +0000 (10:48 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Sun, 2 Aug 2020 08:58:16 +0000 (10:58 +0200)
This way, even if we longjmped out of the code because trucation,
the prism header length is subtracted for -x/-X print.

print-802_11.c

index 9c9e77cf510d4c8e0aafab83e0875373f9f4b2ad..2992adc612024c1a4620aca2cf2468ba49c6c0ce 100644 (file)
@@ -3489,7 +3489,8 @@ prism_if_print(netdissect_options *ndo,
        p += PRISM_HDR_LEN;
        length -= PRISM_HDR_LEN;
        caplen -= PRISM_HDR_LEN;
-       ndo->ndo_ll_hdr_len += PRISM_HDR_LEN + ieee802_11_print(ndo, p, length, caplen, 0, 0);
+       ndo->ndo_ll_hdr_len += PRISM_HDR_LEN;
+       ndo->ndo_ll_hdr_len += ieee802_11_print(ndo, p, length, caplen, 0, 0);
 }
 
 /*