diff options
author | Kristof Provost <kp@FreeBSD.org> | 2024-11-18 11:16:18 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2024-12-17 10:07:16 +0000 |
commit | b717c67686c090ee0f0034dc33a860f23c10f7fe (patch) | |
tree | 6d1f6d3f5e1760bcaadfa1c5f58d124a1c645b1a | |
parent | c6210cfd58f6a570786106f35ebbe1c49f48287c (diff) |
pf tests: verify that we preserve the hop limit/TTL for ICMP errors
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D47802
-rw-r--r-- | tests/sys/netpfil/pf/nat64.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/sys/netpfil/pf/nat64.py b/tests/sys/netpfil/pf/nat64.py index 12793662c171..eeddd5118168 100644 --- a/tests/sys/netpfil/pf/nat64.py +++ b/tests/sys/netpfil/pf/nat64.py @@ -40,6 +40,7 @@ class TestNAT64(VnetTestTemplate): def vnet3_handler(self, vnet): ToolsHelper.print_output("/sbin/sysctl net.inet.ip.forwarding=1") + ToolsHelper.print_output("/sbin/sysctl net.inet.ip.ttl=62") ToolsHelper.print_output("echo foo | nc -l 1234 &") def vnet2_handler(self, vnet): @@ -125,3 +126,7 @@ class TestNAT64(VnetTestTemplate): udp = reply.getlayer(sp.UDPerror) assert udp assert udp.dport == 1222 + + # Check the hop limit + ip6 = reply.getlayer(sp.IPv6) + assert ip6.hlim == 62 |