]> The Tcpdump Group git mirrors - tcpdump/commit
Fix checksum calculation for IPv6 Segment Routing (SRv6) traffic
authorAhmed Abdelsalam <[email protected]>
Thu, 22 Nov 2018 18:05:16 +0000 (19:05 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 29 Mar 2019 11:04:21 +0000 (12:04 +0100)
commita87d6a044893dace0534e91d77ce236a101d5794
treeef1ccfd7a9fc6c52dca6827151cc3474ea5d4664
parent7fbec6b880d00f074fc056c3754a19a5a4c5b25c
Fix checksum calculation for IPv6 Segment Routing (SRv6) traffic

The checksum calculation for IPv6 packets is based on a pseudo
header that includes the packet's final Destination Address (DA).

If the IPv6 packet contains a Routing header, the final DA is the
last element of the Routing header [RFC8200].

Currently, tcpdump supports Routing header types 0 and 2.

IPv6 Segment Routing Header (SRH) is a new Routing header type (4).
SRH is defined in draft-ietf-6man-segment-routing-header [1].

This patch fix the checksum calculation for SRv6 packets. It allows
tcpdump to get the final DA value from SRv6 packets.

[1] https://tools.ietf.org/html/draft-ietf-6man-segment-routing-header-17
print-ip6.c
tests/TESTLIST
tests/ipv6-srh-insert-cksum.out [new file with mode: 0644]
tests/ipv6-srh-insert-cksum.pcap [new file with mode: 0644]