aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2019-03-02 12:30:59 +0000
committerKristof Provost <kp@FreeBSD.org>2019-03-02 12:30:59 +0000
commitbd0eb4dcc463d3f1b85d3abe9a0d2fc31fa0eee4 (patch)
tree10e97499ad3f38257741340fcf2b814058c0765a /tests
parentb43e2d7de63349370396e8a38059fe9249394d14 (diff)
Notes
Diffstat (limited to 'tests')
-rwxr-xr-xtests/sys/netpfil/pf/pass_block.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/sys/netpfil/pf/pass_block.sh b/tests/sys/netpfil/pf/pass_block.sh
index d7a41b98f2c66..14c26b6d5f0dd 100755
--- a/tests/sys/netpfil/pf/pass_block.sh
+++ b/tests/sys/netpfil/pf/pass_block.sh
@@ -129,9 +129,45 @@ noalias_cleanup()
pft_cleanup
}
+atf_test_case "nested_inline" "cleanup"
+nested_inline_head()
+{
+ atf_set descr "Test nested inline anchors, PR196314"
+ atf_set require.user root
+}
+
+nested_inline_body()
+{
+ pft_init
+
+ epair=$(vnet_mkepair)
+ ifconfig ${epair}a inet 192.0.2.1/24 up
+
+ vnet_mkjail alcatraz ${epair}b
+ jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up
+
+ jexec alcatraz pfctl -e
+ pft_set_rules alcatraz \
+ "block in" \
+ "anchor \"an1\" {" \
+ "pass in quick proto tcp to port time" \
+ "anchor \"an2\" {" \
+ "pass in quick proto icmp" \
+ "}" \
+ "}"
+
+ atf_check -s exit:0 -o ignore ping -c 1 -t 1 192.0.2.2
+}
+
+nested_inline_cleanup()
+{
+ pft_cleanup
+}
+
atf_init_test_cases()
{
atf_add_test_case "v4"
atf_add_test_case "v6"
atf_add_test_case "noalias"
+ atf_add_test_case "nested_inline"
}