]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-egp.c
bgp: Parse BGP extended message support capability
[tcpdump] / print-egp.c
index bb93b025859304d0ea5f8c86cc27f3fec1048233..bf9578db9bffc247760dd1abb385ae5e58c592d6 100644 (file)
@@ -265,10 +265,7 @@ egp_print(netdissect_options *ndo,
 
        ndo->ndo_protocol = "egp";
        egp = (const struct egp_packet *)bp;
-       if (length < sizeof(*egp)) {
-               ND_PRINT(" packet length %u < %zu", length, sizeof(*egp));
-               goto invalid;
-       }
+       ND_LCHECKMSG_ZU(length, sizeof(*egp), "packet length");
        ND_TCHECK_SIZE(egp);
 
        version = GET_U_1(egp->egp_version);