git: 8b28ec3861d5 - main - pf tests: test longer anchor names
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 May 2024 20:31:28 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=8b28ec3861d5b3e9fd8a60dbfda13059a5301281
commit 8b28ec3861d5b3e9fd8a60dbfda13059a5301281
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2024-05-24 12:50:53 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2024-05-28 20:29:38 +0000
pf tests: test longer anchor names
PR: 279225
MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
---
tests/sys/netpfil/pf/anchor.sh | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/tests/sys/netpfil/pf/anchor.sh b/tests/sys/netpfil/pf/anchor.sh
index b1faa5f6c57e..311d6485e794 100644
--- a/tests/sys/netpfil/pf/anchor.sh
+++ b/tests/sys/netpfil/pf/anchor.sh
@@ -58,6 +58,37 @@ pr183198_cleanup()
pft_cleanup
}
+atf_test_case "pr279225" "cleanup"
+pr279225_head()
+{
+ atf_set descr "Test that we can retrieve longer anchor names, PR 279225"
+ atf_set require.user root
+}
+
+pr279225_body()
+{
+ pft_init
+
+ vnet_mkjail alcatraz
+
+ pft_set_rules alcatraz \
+ "nat-anchor \"appjail-nat/jail/*\" all" \
+ "rdr-anchor \"appjail-rdr/*\" all" \
+ "anchor \"appjail/jail/*\" all"
+
+ atf_check -s exit:0 -o match:"nat-anchor \"appjail-nat/jail/\*\" all \{" \
+ jexec alcatraz pfctl -sn -a "*"
+ atf_check -s exit:0 -o match:"rdr-anchor \"appjail-rdr/\*\" all \{" \
+ jexec alcatraz pfctl -sn -a "*"
+ atf_check -s exit:0 -o match:"anchor \"appjail/jail/\*\" all \{" \
+ jexec alcatraz pfctl -sr -a "*"
+}
+
+pr279225_cleanup()
+{
+ pft_cleanup
+}
+
atf_test_case "nested_anchor" "cleanup"
nested_anchor_head()
{
@@ -167,6 +198,7 @@ nested_label_cleanup()
atf_init_test_cases()
{
atf_add_test_case "pr183198"
+ atf_add_test_case "pr279225"
atf_add_test_case "nested_anchor"
atf_add_test_case "wildcard"
atf_add_test_case "nested_label"