]> The Tcpdump Group git mirrors - tcpdump/commitdiff
BRCMTAG: Remove a useless test
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 12 Jul 2020 19:52:03 +0000 (21:52 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 13 Jul 2020 15:28:32 +0000 (17:28 +0200)
Because packet length (length) >= capture length (caplen), when
caplen >= BRCM_TAG_LEN, length >= caplen cannot be < BRCM_TAG_LEN.

(see the sanity checks in print.c, pretty_print_packet() function)

print-brcmtag.c

index ff9c5cb37ba4a2b949fc28619330da6fb18d270e..da8b8a52c47b2c3a2b6e390699e1872e69b54982 100644 (file)
@@ -135,11 +135,6 @@ brcm_tag_prepend_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
                return (caplen);
        }
 
-       if (length < BRCM_TAG_LEN) {
-               nd_print_trunc(ndo);
-               return (length);
-       }
-
        if (ndo->ndo_eflag) {
                /* Print the prepended Broadcom tag. */
                brcm_tag_print(ndo, p);