rfc2766_5.3.2_checksum_icmp.seq - Verify IPv6 <-> IPv4 header translation in accordance with RFC2766 [NATPT]
Router
rfc2766_5.3.2_checksum_icmp.seq [-tooloption ...] -p rfc2766_5.3.2_checksum_icmp.def
Before this test starts, run initialize_natpt.seq.
This test verifies that NUT adjusts header checksum for ICMP packets. Network Topology
Link0 -------------------------- | | TN NUT | | -------------------------- Link1
TN -- (Link0) -- NUT NUT -- (Link1) -- TN --------------------- ------------------------
1.1. ===================> IPv6 ICMP packet IPv6 Header src address : TN LINK0 IPv4 embedded IPv6 address dst address : TN LINK1 IPv4 embedded IPv6 address ICMPv6 Destination Unreachable Type = 1 Code = 0 Payload (48 bytes) IPv6 Header (40 bytes) src address : TN LINK0 IPv4 embedded IPv6 address dst address : TN LINK1 IPv4 embedded IPv6 address NextHeader = 17 UDP packet (first 8 bytes) Checksum including IPv6 pseudo header data = repeat(0xff,1422) 1.2. <<JUDGMENT>> ===================> IPv4 ICMP packet IPv4 Header src address : TN LINK0 IPv4 address dst address : TN LINK1 IPv4 address DF = 1 ICMPv4 Destination Unreachable Type = 3 Code = 1 Payload (28 bytes) IPv4 Header (20 bytes) src address : TN LINK0 IPv4 address dst address : TN LINK1 IPv4 address DF = 1 Protocol = 17 UDP packet (first 8 bytes) Checksum including IPv4 pseudo header data = repeat(0xff,1422)
<< PASS >> NUT will translate ICMPv6 Destination Unreachable to ICMPv4 Destination Unreachable. NUT will translate the inner IPv6 UDP packet to the equivalent IPv4 UDP packet. NUT will update checksums for the inner and outer IP headers. << FAIL >> NUT does not translate correctly.
RFC2766
5.3.2 TCP/UDP/ICMP Checksum Update from IPv6 to IPv4
The checksum calculation for a V4 ICMP header needs to be derived from the V6 ICMP header by running the checksum adjustment algorithm [NAT] to remove the V6 pseudo header from the computation. Note, the adjustment must additionally take into account changes to the checksum as a result of updates to the source and destination addresses (and transport ports in the case of NAPT-PT) made to the payload carried within ICMP.
perldoc V6evalTool