summaryrefslogtreecommitdiff
path: root/print-rt6.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-08-10 16:22:37 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-09-05 14:59:21 +0200
commit929e4be621ebdcede37865a5767a175f083f9138 (patch)
treebf6ecbc038696e66176b2d50e04e015767f23b3d /print-rt6.c
parent54b5db3dde658894be730b15480f9b6e27b717a0 (diff)
downloadtcpdump-test-rc.tar.gz
Remove many (761) redundant ND_TCHECK_n() callstest-rc
ND_TCHECK_n(e), n in { 1, 2, 3, 4, 8 }. They are redundant because they are followed by a GET_.*_n(e) call, same n, same e, which do the bounds check. Remove unused 'trunc' labels and most associated codes. Update the outputs of some tests accordingly.
Diffstat (limited to 'print-rt6.c')
-rw-r--r--print-rt6.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/print-rt6.c b/print-rt6.c
index a6886f94..cd875db7 100644
--- a/print-rt6.c
+++ b/print-rt6.c
@@ -60,7 +60,6 @@ rt6_print(netdissect_options *ndo, const u_char *bp, const u_char *bp2 _U_)
case IPV6_RTHDR_TYPE_2: /* Mobile IPv6 ID-20 */
dp0 = (const struct ip6_rthdr0 *)dp;
- ND_TCHECK_4(dp0->ip6r0_reserved);
if (GET_BE_U_4(dp0->ip6r0_reserved) || ndo->ndo_vflag) {
ND_PRINT(", rsv=0x%0x",
GET_BE_U_4(dp0->ip6r0_reserved));
@@ -81,16 +80,13 @@ rt6_print(netdissect_options *ndo, const u_char *bp, const u_char *bp2 _U_)
break;
case IPV6_RTHDR_TYPE_4:
srh = (const struct ip6_srh *)dp;
- ND_TCHECK_1(srh->srh_last_ent);
ND_PRINT(", last-entry=%u", GET_U_1(srh->srh_last_ent));
- ND_TCHECK_1(srh->srh_flags);
if (GET_U_1(srh->srh_flags) || ndo->ndo_vflag) {
ND_PRINT(", flags=0x%0x",
GET_U_1(srh->srh_flags));
}
- ND_TCHECK_2(srh->srh_tag);
ND_PRINT(", tag=%x", GET_BE_U_2(srh->srh_tag));
if (len % 2 == 1)