]> The Tcpdump Group git mirrors - tcpdump/commitdiff
RIPng: Print the protocol name when the version is invalid
authorFrancois-Xavier Le Bail <[email protected]>
Thu, 16 Feb 2023 08:28:28 +0000 (09:28 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 16 Feb 2023 08:31:47 +0000 (09:31 +0100)
Update the output of a test accordingly.

print-ripng.c
tests/hoobr_ripng_print.out

index 224c17fe2cf8093a86a588b7efa8f92ec1136a4c..94ebf1bc4c4ec6c4a2b18f6f2cc6f54d02d78a99 100644 (file)
@@ -117,7 +117,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);
index 309cf8c9251982d013445e2a3183108924d3d19a..b58cf8b25dcd5d22ddd92110bdb1e9c49f040b31 100644 (file)
@@ -1 +1 @@
-    1  05:27:12.808464432 IP 48.48.48.48.521 > 48.48.48.48.12336:  [vers 48] (invalid)
+    1  05:27:12.808464432 IP 48.48.48.48.521 > 48.48.48.48.12336: ripng [version 48, must be 1] (invalid)