From: Francois-Xavier Le Bail Date: Thu, 10 Sep 2020 15:23:11 +0000 (+0200) Subject: RT6: Print [Deprecated] for type 0 (RFC 5095) X-Git-Tag: tcpdump-4.99-bp~234 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/706012eefc64e253463e5e179f13cfa0a4bb9ff6 RT6: Print [Deprecated] for type 0 (RFC 5095) --- diff --git a/print-rt6.c b/print-rt6.c index a83ea379..764852f2 100644 --- a/print-rt6.c +++ b/print-rt6.c @@ -55,6 +55,8 @@ rt6_print(netdissect_options *ndo, const u_char *bp, const u_char *bp2 _U_) 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) { diff --git a/tests/ipv6-routing-header.out b/tests/ipv6-routing-header.out index d9b26a97..cdb36077 100644 --- a/tests/ipv6-routing-header.out +++ b/tests/ipv6-routing-header.out @@ -1,4 +1,4 @@ - 1 16:51:31.766766 IP6 (hlim 4, next-header Routing (43) payload length: 32) 2200::244:212:3fff:feae:22f7 > 2200::240:2:0:0:4: RT6 (len=2, type=0, segleft=1, rsv=0x0, [0]2200::210:2:0:0:4) [icmp6 sum ok] ICMP6, echo request, id 0, seq 0 - 2 16:51:32.803243 IP6 (hlim 5, next-header Routing (43) payload length: 48) 2200::244:212:3fff:feae:22f7 > 2200::211:2:0:0:2: RT6 (len=4, type=0, segleft=2, rsv=0x0, [0]2200::210:2:0:0:4, [1]2200::240:2:0:0:4) [icmp6 sum ok] ICMP6, echo request, id 0, seq 0 - 3 16:51:33.575585 IP6 (hlim 4, next-header Routing (43) payload length: 32) 2200::244:212:3fff:feae:22f7 > 2200::240:2:0:0:4: RT6 (len=2, type=0, segleft=1, rsv=0x0, [0]2200::210:2:0:0:4) 5645 > 5642: [udp sum ok] UDP, length 0 - 4 16:51:34.608086 IP6 (hlim 5, next-header Routing (43) payload length: 48) 2200::244:212:3fff:feae:22f7 > 2200::211:2:0:0:2: RT6 (len=4, type=0, segleft=2, rsv=0x0, [0]2200::210:2:0:0:4, [1]2200::240:2:0:0:4) 5645 > 5642: [udp sum ok] UDP, length 0 + 1 16:51:31.766766 IP6 (hlim 4, next-header Routing (43) payload length: 32) 2200::244:212:3fff:feae:22f7 > 2200::240:2:0:0:4: RT6 (len=2, type=0 [Deprecated], segleft=1, rsv=0x0, [0]2200::210:2:0:0:4) [icmp6 sum ok] ICMP6, echo request, id 0, seq 0 + 2 16:51:32.803243 IP6 (hlim 5, next-header Routing (43) payload length: 48) 2200::244:212:3fff:feae:22f7 > 2200::211:2:0:0:2: RT6 (len=4, type=0 [Deprecated], segleft=2, rsv=0x0, [0]2200::210:2:0:0:4, [1]2200::240:2:0:0:4) [icmp6 sum ok] ICMP6, echo request, id 0, seq 0 + 3 16:51:33.575585 IP6 (hlim 4, next-header Routing (43) payload length: 32) 2200::244:212:3fff:feae:22f7 > 2200::240:2:0:0:4: RT6 (len=2, type=0 [Deprecated], segleft=1, rsv=0x0, [0]2200::210:2:0:0:4) 5645 > 5642: [udp sum ok] UDP, length 0 + 4 16:51:34.608086 IP6 (hlim 5, next-header Routing (43) payload length: 48) 2200::244:212:3fff:feae:22f7 > 2200::211:2:0:0:2: RT6 (len=4, type=0 [Deprecated], segleft=2, rsv=0x0, [0]2200::210:2:0:0:4, [1]2200::240:2:0:0:4) 5645 > 5642: [udp sum ok] UDP, length 0 diff --git a/tests/ipv6-rthdr-oobr.out b/tests/ipv6-rthdr-oobr.out index 00e8cdf1..35eaaa6b 100644 --- a/tests/ipv6-rthdr-oobr.out +++ b/tests/ipv6-rthdr-oobr.out @@ -1 +1 @@ - 1 05:27:12.808464432 IP6 3030:3030:3030:3030:3030:3030:3030:3030 > 3030:3030:3030:3030:3030:3030:3030:3030: RT6 (len=48, type=0, segleft=48 [|rt6] + 1 05:27:12.808464432 IP6 3030:3030:3030:3030:3030:3030:3030:3030 > 3030:3030:3030:3030:3030:3030:3030:3030: RT6 (len=48, type=0 [Deprecated], segleft=48 [|rt6]