]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-rt6.c
remove redundant ND_TCHECK, let GET_ routines handle checks
[tcpdump] / print-rt6.c
index a83ea379498ab969079d05c53270221dfd680332..e7d9fbde8ca259ac3cefd6237f865cd957e60291 100644 (file)
@@ -49,12 +49,12 @@ rt6_print(netdissect_options *ndo, const u_char *bp, const u_char *bp2 _U_)
        nd_print_protocol_caps(ndo);
        dp = (const struct ip6_rthdr *)bp;
 
-       ND_TCHECK_1(dp->ip6r_segleft);
-
        len = GET_U_1(dp->ip6r_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) {