git: b717c67686c0 - main - pf tests: verify that we preserve the hop limit/TTL for ICMP errors
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 17 Dec 2024 10:08:03 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=b717c67686c090ee0f0034dc33a860f23c10f7fe
commit b717c67686c090ee0f0034dc33a860f23c10f7fe
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2024-11-18 11:16:18 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2024-12-17 10:07:16 +0000
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
---
tests/sys/netpfil/pf/nat64.py | 5 +++++
1 file changed, 5 insertions(+)
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