Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108062760
D35364.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
D35364.diff
View Options
diff --git a/tests/sys/netpfil/pf/ether.sh b/tests/sys/netpfil/pf/ether.sh
--- a/tests/sys/netpfil/pf/ether.sh
+++ b/tests/sys/netpfil/pf/ether.sh
@@ -553,6 +553,46 @@
pft_cleanup
}
+atf_test_case "tag" "cleanup"
+tag_head()
+{
+ atf_set descr 'Test setting tags'
+ atf_set require.user root
+}
+
+tag_body()
+{
+ pft_init
+
+ epair=$(vnet_mkepair)
+
+ vnet_mkjail alcatraz ${epair}b
+ ifconfig ${epair}a 192.0.2.1/24 up
+ jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up
+
+ # Sanity check
+ atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2
+
+ jexec alcatraz pfctl -e
+ pft_set_rules alcatraz \
+ "ether pass in tag foo" \
+ "block in tagged foo"
+
+ atf_check -s exit:2 -o ignore ping -c 1 192.0.2.2
+
+ pft_set_rules alcatraz \
+ "ether pass in tag bar" \
+ "block in tagged foo"
+
+ # Still passes when tagged differently
+ atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2
+}
+
+tag_cleanup()
+{
+ pft_cleanup
+}
+
atf_test_case "match_tag" "cleanup"
match_tag_head()
{
@@ -604,5 +644,6 @@
atf_add_test_case "dummynet"
atf_add_test_case "anchor"
atf_add_test_case "ip"
+ atf_add_test_case "tag"
atf_add_test_case "match_tag"
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 22, 1:29 AM (21 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16022991
Default Alt Text
D35364.diff (1 KB)
Attached To
Mode
D35364: pf tests: basic 'tagged' test for Ethernet rules
Attached
Detach File
Event Timeline
Log In to Comment