]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-egp.c
Makefile.in: don't remove configure and config.h.in in make distclean.
[tcpdump] / print-egp.c
index bb93b025859304d0ea5f8c86cc27f3fec1048233..526e36dde6563167559d04dbfca20b06d5d85445 100644 (file)
@@ -206,7 +206,7 @@ egpnr_print(netdissect_options *ndo,
                length--;
                ND_PRINT(" %s %s ",
                       gateways < intgw ? "int" : "ext",
-                      ipaddr_string(ndo, (const u_char *)&addr));
+                      ipaddr_string(ndo, (const u_char *)&addr)); /* local buffer, not packet data; don't use GET_IPADDR_STRING() */
 
                comma = "";
                ND_PRINT("(");
@@ -241,7 +241,7 @@ egpnr_print(netdissect_options *ndo,
                                        cp++;
                                        length -= 2;
                                }
-                               ND_PRINT(" %s", ipaddr_string(ndo, (const u_char *)&addr));
+                               ND_PRINT(" %s", ipaddr_string(ndo, (const u_char *)&addr)); /* local buffer, not packet data; don't use GET_IPADDR_STRING() */
                                networks--;
                        }
                        distances--;
@@ -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_ICHECKMSG_ZU("packet length", length, <, sizeof(*egp));
        ND_TCHECK_SIZE(egp);
 
        version = GET_U_1(egp->egp_version);