]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ripng.c
CI: Add warning exemptions for Sun C (suncc-5.14) on Solaris 10
[tcpdump] / print-ripng.c
index c4f4ea3a1db2178d1ec4d35546f9f82704551812..c6955cb8ef145da036143d3d19db65085b1a43f5 100644 (file)
@@ -23,9 +23,7 @@
 
 /* specification: RFC 2080 */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#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)) {