Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115934829
D36414.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36414.diff
View Options
diff --git a/tests/sys/netpfil/pf/anchor.sh b/tests/sys/netpfil/pf/anchor.sh
--- a/tests/sys/netpfil/pf/anchor.sh
+++ b/tests/sys/netpfil/pf/anchor.sh
@@ -93,8 +93,47 @@
pft_cleanup
}
+atf_test_case "wildcard" "cleanup"
+wildcard_head()
+{
+ atf_set descr 'Test wildcard anchors for functionality'
+ atf_set require.user root
+}
+
+wildcard_body()
+{
+ pft_init
+
+ epair=$(vnet_mkepair)
+ vnet_mkjail alcatraz ${epair}a
+
+ ifconfig ${epair}b 192.0.2.2/24 up
+ jexec alcatraz ifconfig ${epair}a 192.0.2.1/24 up
+
+ # Sanity check
+ atf_check -s exit:0 -o ignore ping -c 1 192.0.2.1
+
+ jexec alcatraz pfctl -e
+ pft_set_rules alcatraz \
+ "block" \
+ "anchor \"foo/*\""
+
+ atf_check -s exit:2 -o ignore ping -c 1 192.0.2.1
+
+ echo "pass" | jexec alcatraz pfctl -g -f - -a "foo/bar"
+
+ jexec alcatraz pfctl -sr -a "*"
+ atf_check -s exit:0 -o ignore ping -c 1 192.0.2.1
+}
+
+wildcard_cleanup()
+{
+ pft_cleanup
+}
+
atf_init_test_cases()
{
atf_add_test_case "pr183198"
atf_add_test_case "nested_anchor"
+ atf_add_test_case "wildcard"
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 1, 2:49 PM (18 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17884067
Default Alt Text
D36414.diff (1 KB)
Attached To
Mode
D36414: pf tests: test wildcard anchors
Attached
Detach File
Event Timeline
Log In to Comment