summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-09-10 17:23:11 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2020-09-10 17:23:11 +0200
commit706012eefc64e253463e5e179f13cfa0a4bb9ff6 (patch)
treeec92797040ae8e3bbfd7db594cbac9b4d3958d0a
parent8a776c2410fb4ff349d982fcf187924351c4b9b0 (diff)
downloadtcpdump-706012eefc64e253463e5e179f13cfa0a4bb9ff6.tar.gz
RT6: Print [Deprecated] for type 0 (RFC 5095)
-rw-r--r--print-rt6.c2
-rw-r--r--tests/ipv6-routing-header.out8
-rw-r--r--tests/ipv6-rthdr-oobr.out2
3 files changed, 7 insertions, 5 deletions
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]