Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/netpfil/common/utils.subr
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | |||||
dummynet_init() | dummynet_init() | ||||
{ | { | ||||
firewall=$1 | firewall=$1 | ||||
if ! kldstat -q -m dummynet; then | if ! kldstat -q -m dummynet; then | ||||
atf_skip "This test requires dummynet" | atf_skip "This test requires dummynet" | ||||
fi | fi | ||||
if [ ${firewall} == "ipfw" ]; then | case $firewall in | ||||
ipfw|pf) | |||||
# Nothing. This is okay. | # Nothing. This is okay. | ||||
else | ;; | ||||
*) | |||||
atf_skip "${firewall} does not support dummynet" | atf_skip "${firewall} does not support dummynet" | ||||
fi | ;; | ||||
esac | |||||
} | } | ||||
nat_init() | nat_init() | ||||
{ | { | ||||
firewall=$1 | firewall=$1 | ||||
if [ ${firewall} == "ipfw" ]; then | if [ ${firewall} == "ipfw" ]; then | ||||
if ! kldstat -q -m ipfw_nat; then | if ! kldstat -q -m ipfw_nat; then | ||||
atf_skip "This test requires ipfw_nat" | atf_skip "This test requires ipfw_nat" | ||||
Show All 12 Lines |