]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-rt6.c
Revert partially the commit 21b1273
[tcpdump] / print-rt6.c
index 980d675faa308dfbb14d243fdf44818fc1fe4ba8..e7d9fbde8ca259ac3cefd6237f865cd957e60291 100644 (file)
@@ -45,14 +45,16 @@ rt6_print(netdissect_options *ndo, const u_char *bp, const u_char *bp2 _U_)
        const u_char *p;
 
        ndo->ndo_protocol = "rt6";
-       dp = (const struct ip6_rthdr *)bp;
 
-       ND_TCHECK_1(dp->ip6r_segleft);
+       nd_print_protocol_caps(ndo);
+       dp = (const struct ip6_rthdr *)bp;
 
        len = GET_U_1(dp->ip6r_len);
-       ND_PRINT("srcrt (len=%u", len); /*)*/
+       ND_PRINT(" (len=%u", len);      /*)*/
        type = GET_U_1(dp->ip6r_type);
        ND_PRINT(", type=%u", type);
+       if (type == IPV6_RTHDR_TYPE_0)
+               ND_PRINT(" [Deprecated]");
        ND_PRINT(", segleft=%u", GET_U_1(dp->ip6r_segleft));
 
        switch (type) {
@@ -106,6 +108,6 @@ rt6_print(netdissect_options *ndo, const u_char *bp, const u_char *bp2 _U_)
        }
 
  trunc:
-       ND_PRINT("[|srcrt]");
+       nd_print_trunc(ndo);
        return -1;
 }