aboutsummaryrefslogtreecommitdiff
path: root/tests/sys/netpfil/pf/limits.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sys/netpfil/pf/limits.sh')
-rw-r--r--tests/sys/netpfil/pf/limits.sh35
1 files changed, 35 insertions, 0 deletions
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"
}