X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/63ffe2f1e36e5c820b2a6df8d5d5eeb23458fdb6..296d466cd6bbf2f7e75e15bb6a01268e88c76ed0:/print-ripng.c diff --git a/print-ripng.c b/print-ripng.c index c4f4ea3a..c6955cb8 100644 --- a/print-ripng.c +++ b/print-ripng.c @@ -23,9 +23,7 @@ /* specification: RFC 2080 */ -#ifdef HAVE_CONFIG_H #include -#endif #include "netdissect-stdinc.h" @@ -117,7 +115,8 @@ ripng_print(netdissect_options *ndo, const u_char *dat, unsigned int length) ndo->ndo_protocol = "ripng"; vers = GET_U_1(rp->rip6_vers); if (vers != RIP6_VERSION) { - ND_PRINT(" [vers %u]", vers); + nd_print_protocol(ndo); + ND_PRINT(" [version %u, must be %u]", vers, RIP6_VERSION); goto invalid; } cmd = GET_U_1(rp->rip6_cmd); @@ -128,7 +127,7 @@ ripng_print(netdissect_options *ndo, const u_char *dat, unsigned int length) if (length_left < (sizeof(struct rip6) - sizeof(struct netinfo6))) goto invalid; length_left -= (sizeof(struct rip6) - sizeof(struct netinfo6)); - j = length_left / sizeof(*ni); + j = length_left / sizeof(*ni); if (j == 1) { if (GET_U_1(rp->rip6_nets->rip6_metric) == HOPCNT_INFINITY6 && ND_IN6_IS_ADDR_UNSPECIFIED(&rp->rip6_nets->rip6_dest)) {