git: 7eb30b26aa12 - main - pf tests: test set limit
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 17 Sep 2025 14:15:44 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=7eb30b26aa12cf1b80b6a784ccbd0b6f648f4529
commit 7eb30b26aa12cf1b80b6a784ccbd0b6f648f4529
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-08-25 13:44:11 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-09-17 14:15:15 +0000
pf tests: test set limit
Verify that 'set limit anchors' now has the expected effect.
Sponsored by: Rubicon Communications, LLC ("Netgate")
---
tests/sys/netpfil/pf/limits.sh | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/tests/sys/netpfil/pf/limits.sh b/tests/sys/netpfil/pf/limits.sh
index 69f0b6af2ccf..a0d6b891ee19 100644
--- a/tests/sys/netpfil/pf/limits.sh
+++ b/tests/sys/netpfil/pf/limits.sh
@@ -112,8 +112,43 @@ zero_cleanup()
pft_cleanup
}
+atf_test_case "anchors" "cleanup"
+anchors_head()
+{
+ atf_set descr 'Test increasing maximum number of anchors'
+ atf_set require.user root
+}
+
+anchors_body()
+{
+ pft_init
+
+ vnet_mkjail alcatraz
+
+ jexec alcatraz pfctl -e
+
+ pft_set_rules alcatraz \
+ "set limit anchors 1"
+
+ pft_set_rules alcatraz \
+ "set limit anchors 2" \
+ "pass" \
+ "anchor \"foo\" {\n
+ pass in\n
+ }" \
+ "anchor \"bar\" {\n
+ pass out\n
+ }"
+}
+
+anchors_cleanup()
+{
+ pft_cleanup
+}
+
atf_init_test_cases()
{
atf_add_test_case "basic"
atf_add_test_case "zero"
+ atf_add_test_case "anchors"
}