]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Ethernet: Rework the length checks
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 21 Nov 2021 14:33:24 +0000 (15:33 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Sun, 21 Nov 2021 14:49:13 +0000 (15:49 +0100)
Add a sanity check: packet length need to be >= capture length

(Like a sanity check in print.c, pretty_print_packet() function)

Remove a now useless test:
Because packet length (length) >= capture length (caplen), when
caplen >= ETHER_HDRLEN + switch_tag_len, length cannot
be < ETHER_HDRLEN + switch_tag_len.


No differences found