Changeset View
Changeset View
Standalone View
Standalone View
head/tests/sys/netinet/fibs_test.sh
Show First 20 Lines • Show All 760 Lines • ▼ Show 20 Lines | |||||
# Creates a new pair of connected epair(4) interface, registers them for | # Creates a new pair of connected epair(4) interface, registers them for | ||||
# cleanup, and returns their namen via the environment variables EPAIRA and | # cleanup, and returns their namen via the environment variables EPAIRA and | ||||
# EPAIRB | # EPAIRB | ||||
get_epair() | get_epair() | ||||
{ | { | ||||
local EPAIRD | local EPAIRD | ||||
if (which pfctl && pfctl -s info | grep -q 'Status: Enabled') || | |||||
[ `sysctl -n net.inet.ip.fw.enable` = "1" ] || | |||||
(which ipf && ipf -V); then | |||||
atf_skip "firewalls interfere with this test" | |||||
fi | |||||
if EPAIRD=`ifconfig epair create`; then | if EPAIRD=`ifconfig epair create`; then | ||||
# Record the epair device so we can clean it up later | # Record the epair device so we can clean it up later | ||||
echo ${EPAIRD} >> "ifaces_to_cleanup" | echo ${EPAIRD} >> "ifaces_to_cleanup" | ||||
EPAIRA=${EPAIRD} | EPAIRA=${EPAIRD} | ||||
EPAIRB=${EPAIRD%a}b | EPAIRB=${EPAIRD%a}b | ||||
else | else | ||||
atf_skip "Could not create epair(4) interfaces" | atf_skip "Could not create epair(4) interfaces" | ||||
fi | fi | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |