Changeset View
Changeset View
Standalone View
Standalone View
head/tests/sys/netpfil/pf/utils.subr
Show All 17 Lines | pft_mkepair() | ||||
ifname=$(ifconfig epair create) | ifname=$(ifconfig epair create) | ||||
echo $ifname >> created_interfaces.lst | echo $ifname >> created_interfaces.lst | ||||
echo ${ifname%a} | echo ${ifname%a} | ||||
} | } | ||||
pft_mkjail() | pft_mkjail() | ||||
{ | { | ||||
jailname=$1 | jailname=$1 | ||||
ifname=$2 | shift | ||||
jail -c name=${jailname} persist vnet vnet.interface=${ifname} | |||||
vnet_interfaces= | |||||
for ifname in $@ | |||||
do | |||||
vnet_interfaces="${vnet_interfaces} vnet.interface=${ifname}" | |||||
done | |||||
jail -c name=${jailname} persist vnet ${vnet_interfaces} | |||||
echo $jailname >> created_jails.lst | echo $jailname >> created_jails.lst | ||||
} | } | ||||
pft_cleanup() | pft_cleanup() | ||||
{ | { | ||||
if [ -f created_interfaces.lst ]; then | if [ -f created_interfaces.lst ]; then | ||||
for ifname in `cat created_interfaces.lst` | for ifname in `cat created_interfaces.lst` | ||||
Show All 12 Lines |