pf tests: factor out common dummynet check
Reviewed by: glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D35160
This commit is contained in:
parent
a908f8f0dc
commit
1977d9a37b
@ -326,11 +326,7 @@ captive_long_body()
|
||||
# Host is client, jail 'gw' is the captive portal gateway, jail 'srv'
|
||||
# is a random (web)server. We use the echo protocol rather than http
|
||||
# for the test, because that's easier.
|
||||
pft_init
|
||||
|
||||
if ! kldstat -q -m dummynet; then
|
||||
atf_skip "This test requires dummynet"
|
||||
fi
|
||||
dummynet_init
|
||||
|
||||
epair_gw=$(vnet_mkepair)
|
||||
epair_srv=$(vnet_mkepair)
|
||||
|
@ -36,10 +36,7 @@ dummynet_head()
|
||||
|
||||
dummynet_body()
|
||||
{
|
||||
pft_init
|
||||
if ! kldstat -q -m dummynet; then
|
||||
atf_skip "This test requires dummynet"
|
||||
fi
|
||||
dummynet_init
|
||||
|
||||
epair=$(vnet_mkepair)
|
||||
vnet_mkjail alcatraz ${epair}b
|
||||
|
@ -87,6 +87,15 @@ pflog_init()
|
||||
fi
|
||||
}
|
||||
|
||||
dummynet_init()
|
||||
{
|
||||
pft_init
|
||||
|
||||
if ! kldstat -q -m dummynet; then
|
||||
atf_skip "This test requires dummynet"
|
||||
fi
|
||||
}
|
||||
|
||||
pft_set_rules()
|
||||
{
|
||||
jname=$1
|
||||
|
Loading…
Reference in New Issue
Block a user