]> The Tcpdump Group git mirrors - tcpdump/commitdiff
SLL: Remove two useless tests
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 13 Sep 2018 17:24:27 +0000 (19:24 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 13 Sep 2018 17:24:27 +0000 (19:24 +0200)
Because packet length (length) >= capture length (caplen).

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

print-sll.c

index 3c25a9a556e1a90c6e98112ceeeeda6e64e51daf..515265797b17717d56065a4345a2ecbb9d5b2093 100644 (file)
@@ -293,10 +293,6 @@ recurse:
                        ND_PRINT("[|vlan]");
                        return (hdrlen + caplen);
                }
-               if (length < 4) {
-                       ND_PRINT("[|vlan]");
-                       return (hdrlen + length);
-               }
                if (ndo->ndo_eflag) {
                        uint16_t tag = EXTRACT_BE_U_2(p);
 
@@ -484,10 +480,6 @@ recurse:
                        ND_PRINT("[|vlan]");
                        return (hdrlen + caplen);
                }
-               if (length < 4) {
-                       ND_PRINT("[|vlan]");
-                       return (hdrlen + length);
-               }
                if (ndo->ndo_eflag) {
                        uint16_t tag = EXTRACT_BE_U_2(p);