1# $FreeBSD$ 2 3. $(atf_get_srcdir)/utils.subr 4 5atf_test_case "pr183198" "cleanup" 6pr183198_head() 7{ 8 atf_set descr 'Test tables referenced by rules in anchors' 9 atf_set require.user root 10} 11 12pr183198_body() 13{ 14 pft_init 15 16 epair=$(vnet_mkepair) 17 vnet_mkjail alcatraz ${epair}b 18 jexec alcatraz pfctl -e 19 20 # Forward with pf enabled 21 pft_set_rules alcatraz \ 22 "table <test> { 10.0.0.1, 10.0.0.2, 10.0.0.3 }" \ 23 "block in" \ 24 "anchor \"epair\" on ${epair}b { \n\ 25 pass in from <test> \n\ 26 }" 27 28 atf_check -s exit:0 -o ignore jexec alcatraz pfctl -sr -a '*' 29 atf_check -s exit:0 -o ignore jexec alcatraz pfctl -t test -T show 30} 31 32pr183198_cleanup() 33{ 34 pft_cleanup 35} 36 37atf_init_test_cases() 38{ 39 atf_add_test_case "pr183198" 40} 41