pf tests: Test setting and retrieving nested anchors
MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
parent
cd8438e5a3
commit
d58d2e403d
@ -59,7 +59,42 @@ pr183198_cleanup()
|
||||
pft_cleanup
|
||||
}
|
||||
|
||||
atf_test_case "nested_anchor" "cleanup"
|
||||
nested_anchor_head()
|
||||
{
|
||||
atf_set descr 'Test setting and retrieving nested anchors'
|
||||
atf_set require.user root
|
||||
}
|
||||
|
||||
nested_anchor_body()
|
||||
{
|
||||
pft_init
|
||||
|
||||
epair=$(vnet_mkepair)
|
||||
vnet_mkjail alcatraz ${epair}a
|
||||
|
||||
pft_set_rules alcatraz \
|
||||
"anchor \"foo\" { \n\
|
||||
anchor \"bar\" { \n\
|
||||
pass on ${epair}a \n\
|
||||
} \n\
|
||||
}"
|
||||
|
||||
atf_check -s exit:0 -o inline:"anchor \"foo\" all {
|
||||
anchor \"bar\" all {
|
||||
pass on ${epair}a all flags S/SA keep state
|
||||
}
|
||||
}
|
||||
" jexec alcatraz pfctl -sr -a "*"
|
||||
}
|
||||
|
||||
nested_anchor_cleanup()
|
||||
{
|
||||
pft_cleanup
|
||||
}
|
||||
|
||||
atf_init_test_cases()
|
||||
{
|
||||
atf_add_test_case "pr183198"
|
||||
atf_add_test_case "nested_anchor"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user