Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142159750
D39420.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
21 KB
Referenced Files
None
Subscribers
None
D39420.diff
View Options
diff --git a/tests/sys/netinet/forward.sh b/tests/sys/netinet/forward.sh
--- a/tests/sys/netinet/forward.sh
+++ b/tests/sys/netinet/forward.sh
@@ -50,35 +50,35 @@
script_name="../common/sender.py"
epair=$(vnet_mkepair)
- ifconfig ${epair}a up
- ifconfig ${epair}a inet ${ip4a}/${plen}
-
jname="v4t-fwd_ip_icmp_iface_fast_success"
- vnet_mkjail ${jname} ${epair}b
- jexec ${jname} ifconfig ${epair}b up
- jexec ${jname} ifconfig ${epair}b inet ${ip4b}/${plen}
+ vnet_mkjail ${jname}a ${epair}a
+ jexec ${jname}a ifconfig ${epair}a up
+ jexec ${jname}a ifconfig ${epair}a inet ${ip4a}/${plen}
+ vnet_mkjail ${jname}b ${epair}b
+ jexec ${jname}b ifconfig ${epair}b up
+ jexec ${jname}b ifconfig ${epair}b inet ${ip4b}/${plen}
# Get router ip/mac
jail_ip=${ip4b}
- jail_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
+ jail_mac=`jexec ${jname}b ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
- our_mac=`ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
+ our_mac=`jexec ${jname}a ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
- jexec ${jname} sysctl net.inet.ip.forwarding=1
+ jexec ${jname}b sysctl net.inet.ip.forwarding=1
# As we're doing router-on-the-stick, turn sending IP redirects off:
- jexec ${jname} sysctl net.inet.ip.redirect=0
+ jexec ${jname}b sysctl net.inet.ip.redirect=0
# echo "LOCAL: ${local_ip} ${local_mac}"
# echo "REMOTE: ${remote_rtr_ip} ${remote_rtr_mac}"
- atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
+ atf_check -s exit:0 jexec ${jname}a $(atf_get_srcdir)/${script_name} \
--test_name fwd_ip_icmp_fast \
--smac ${our_mac} --dmac ${jail_mac} \
--sip ${src_ip} --dip ${ip4a} \
--iface ${epair}a
# check counters are valid
- atf_check -o match:'1 packet forwarded \(1 packet fast forwarded\)' jexec ${jname} netstat -sp ip
+ atf_check -o match:'1 packet forwarded \(1 packet fast forwarded\)' jexec ${jname}b netstat -sp ip
}
fwd_ip_icmp_iface_fast_success_cleanup()
@@ -107,38 +107,38 @@
script_name="../common/sender.py"
epair=$(vnet_mkepair)
- ifconfig ${epair}a up
- ifconfig ${epair}a inet ${ip4a}/${plen}
-
jname="v4t-fwd_ip_icmp_gw_fast_success"
- vnet_mkjail ${jname} ${epair}b
- jexec ${jname} ifconfig ${epair}b up
- jexec ${jname} ifconfig ${epair}b inet ${ip4b}/${plen}
+ vnet_mkjail ${jname}a ${epair}a
+ jexec ${jname}a ifconfig ${epair}a up
+ jexec ${jname}a ifconfig ${epair}a inet ${ip4a}/${plen}
+ vnet_mkjail ${jname}b ${epair}b
+ jexec ${jname}b ifconfig ${epair}b up
+ jexec ${jname}b ifconfig ${epair}b inet ${ip4b}/${plen}
# Get router ip/mac
jail_ip=${ip4b}
- jail_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
+ jail_mac=`jexec ${jname}b ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
- our_mac=`ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
+ our_mac=`jexec ${jname}a ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
- jexec ${jname} sysctl net.inet.ip.forwarding=1
+ jexec ${jname}b sysctl net.inet.ip.forwarding=1
# As we're doing router-on-the-stick, turn sending IP redirects off:
- jexec ${jname} sysctl net.inet.ip.redirect=0
+ jexec ${jname}b sysctl net.inet.ip.redirect=0
# Add host route
- jexec ${jname} route -4 add -host ${dst_ip} ${ip4a}
+ jexec ${jname}b route -4 add -host ${dst_ip} ${ip4a}
# echo "LOCAL: ${local_ip} ${local_mac}"
# echo "REMOTE: ${remote_rtr_ip} ${remote_rtr_mac}"
- atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
+ atf_check -s exit:0 jexec ${jname}a $(atf_get_srcdir)/${script_name} \
--test_name fwd_ip_icmp_fast \
--smac ${our_mac} --dmac ${jail_mac} \
--sip ${src_ip} --dip ${dst_ip} \
--iface ${epair}a
# check counters are valid
- atf_check -o match:'1 packet forwarded \(1 packet fast forwarded\)' jexec ${jname} netstat -sp ip
+ atf_check -o match:'1 packet forwarded \(1 packet fast forwarded\)' jexec ${jname}b netstat -sp ip
}
fwd_ip_icmp_gw_fast_success_cleanup()
@@ -166,33 +166,33 @@
script_name="../common/sender.py"
epair=$(vnet_mkepair)
- ifconfig ${epair}a up
- ifconfig ${epair}a inet ${ip4a}/${plen}
-
jname="v4t-fwd_ip_icmp_iface_slow_success"
- vnet_mkjail ${jname} ${epair}b
- jexec ${jname} ifconfig ${epair}b up
- jexec ${jname} ifconfig ${epair}b inet ${ip4b}/${plen}
+ vnet_mkjail ${jname}a ${epair}a
+ jexec ${jname}a ifconfig ${epair}a up
+ jexec ${jname}a ifconfig ${epair}a inet ${ip4a}/${plen}
+ vnet_mkjail ${jname}b ${epair}b
+ jexec ${jname}b ifconfig ${epair}b up
+ jexec ${jname}b ifconfig ${epair}b inet ${ip4b}/${plen}
# Get router ip/mac
jail_ip=${ip4b}
- jail_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
+ jail_mac=`jexec ${jname}b ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
- our_mac=`ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
+ our_mac=`jexec ${jname}a ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
- jexec ${jname} sysctl net.inet.ip.forwarding=1
+ jexec ${jname}b sysctl net.inet.ip.forwarding=1
# As we're doing router-on-the-stick, turn sending IP redirects off:
- jexec ${jname} sysctl net.inet.ip.redirect=0
+ jexec ${jname}b sysctl net.inet.ip.redirect=0
# Generate packet with options to force slow-path
- atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
+ atf_check -s exit:0 jexec ${jname}a $(atf_get_srcdir)/${script_name} \
--test_name fwd_ip_icmp_slow \
--smac ${our_mac} --dmac ${jail_mac} \
--sip ${src_ip} --dip ${ip4a} \
--iface ${epair}a
# check counters are valid
- atf_check -o match:'1 packet forwarded \(0 packets fast forwarded\)' jexec ${jname} netstat -sp ip
+ atf_check -o match:'1 packet forwarded \(0 packets fast forwarded\)' jexec ${jname}b netstat -sp ip
}
fwd_ip_icmp_iface_slow_success_cleanup()
@@ -221,38 +221,38 @@
script_name="../common/sender.py"
epair=$(vnet_mkepair)
- ifconfig ${epair}a up
- ifconfig ${epair}a inet ${ip4a}/${plen}
-
jname="v4t-fwd_ip_icmp_gw_slow_success"
- vnet_mkjail ${jname} ${epair}b
- jexec ${jname} ifconfig ${epair}b up
- jexec ${jname} ifconfig ${epair}b inet ${ip4b}/${plen}
+ vnet_mkjail ${jname}a ${epair}a
+ jexec ${jname}a ifconfig ${epair}a up
+ jexec ${jname}a ifconfig ${epair}a inet ${ip4a}/${plen}
+ vnet_mkjail ${jname}b ${epair}b
+ jexec ${jname}b ifconfig ${epair}b up
+ jexec ${jname}b ifconfig ${epair}b inet ${ip4b}/${plen}
# Get router ip/mac
jail_ip=${ip4b}
- jail_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
+ jail_mac=`jexec ${jname}b ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
- our_mac=`ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
+ our_mac=`jexec ${jname}a ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
- jexec ${jname} sysctl net.inet.ip.forwarding=1
+ jexec ${jname}b sysctl net.inet.ip.forwarding=1
# As we're doing router-on-the-stick, turn sending IP redirects off:
- jexec ${jname} sysctl net.inet.ip.redirect=0
+ jexec ${jname}b sysctl net.inet.ip.redirect=0
# Add host route
- jexec ${jname} route -4 add -host ${dst_ip} ${ip4a}
+ jexec ${jname}b route -4 add -host ${dst_ip} ${ip4a}
# echo "LOCAL: ${local_ip} ${local_mac}"
# echo "REMOTE: ${remote_rtr_ip} ${remote_rtr_mac}"
- atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
+ atf_check -s exit:0 jexec ${jname}a $(atf_get_srcdir)/${script_name} \
--test_name fwd_ip_icmp_fast \
--smac ${our_mac} --dmac ${jail_mac} \
--sip ${src_ip} --dip ${dst_ip} \
--iface ${epair}a
# check counters are valid
- atf_check -o match:'1 packet forwarded \(1 packet fast forwarded\)' jexec ${jname} netstat -sp ip
+ atf_check -o match:'1 packet forwarded \(1 packet fast forwarded\)' jexec ${jname}b netstat -sp ip
}
fwd_ip_icmp_gw_slow_success_cleanup()
diff --git a/tests/sys/netinet6/forward6.sh b/tests/sys/netinet6/forward6.sh
--- a/tests/sys/netinet6/forward6.sh
+++ b/tests/sys/netinet6/forward6.sh
@@ -61,38 +61,38 @@
script_name="../common/sender.py"
epair=$(vnet_mkepair)
- ifconfig ${epair}a up
- ifconfig ${epair}a inet6 ${ip6a}/${plen}
-
jname="v6t-${id}-${yl}-${xl}"
- vnet_mkjail ${jname} ${epair}b
- jexec ${jname} ifconfig ${epair}b up
- jexec ${jname} ifconfig ${epair}b inet6 ${ip6b}/${plen}
+ vnet_mkjail ${jname}a ${epair}a
+ vnet_mkjail ${jname}b ${epair}b
+ jexec ${jname}a ifconfig ${epair}a up
+ jexec ${jname}a ifconfig ${epair}a inet6 ${ip6a}/${plen}
+ jexec ${jname}b ifconfig ${epair}b up
+ jexec ${jname}b ifconfig ${epair}b inet6 ${ip6b}/${plen}
- jail_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
+ jail_mac=`jexec ${jname}b ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
- our_mac=`ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
+ our_mac=`jexec ${jname}a ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
# wait for DAD to complete
- while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
+ while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
- while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
+ while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
- jexec ${jname} sysctl net.inet6.ip6.forwarding=1
+ jexec ${jname}b sysctl net.inet6.ip6.forwarding=1
# As we're doing router-on-the-stick, turn sending IP redirects off:
- jexec ${jname} sysctl net.inet6.ip6.redirect=0
+ jexec ${jname}b sysctl net.inet6.ip6.redirect=0
- atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
+ atf_check -s exit:0 jexec ${jname}a $(atf_get_srcdir)/${script_name} \
--test_name fwd_ip6_icmp \
--smac ${our_mac} --dmac ${jail_mac} \
--sip ${src_ip} --dip ${ip6a} \
--iface ${epair}a
# check counters are valid
- atf_check -o match:'1 packet forwarded' jexec ${jname} netstat -sp ip6
+ atf_check -o match:'1 packet forwarded' jexec ${jname}b netstat -sp ip6
}
fwd_ip6_gu_icmp_iface_fast_success_cleanup()
@@ -131,42 +131,42 @@
script_name="../common/sender.py"
- epair=$(vnet_mkepair)
- ifconfig ${epair}a up
- ifconfig ${epair}a inet6 ${ip6a}/${plen}
-
jname="v6t-${id}-${yl}-${xl}"
- vnet_mkjail ${jname} ${epair}b
- jexec ${jname} ifconfig ${epair}b up
- jexec ${jname} ifconfig ${epair}b inet6 ${ip6b}/${plen}
+ epair=$(vnet_mkepair)
+ vnet_mkjail ${jname}a ${epair}a
+ jexec ${jname}a ifconfig ${epair}a up
+ jexec ${jname}a ifconfig ${epair}a inet6 ${ip6a}/${plen}
+ vnet_mkjail ${jname}b ${epair}b
+ jexec ${jname}b ifconfig ${epair}b up
+ jexec ${jname}b ifconfig ${epair}b inet6 ${ip6b}/${plen}
- jail_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
+ jail_mac=`jexec ${jname}b ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
- our_mac=`ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
+ our_mac=`jexec ${jname}a ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
# wait for DAD to complete
- while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
+ while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
- while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
+ while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
# Add static route back to us
- jexec ${jname} route add -6 -host ${dst_ip} ${ip6a}
+ jexec ${jname}b route add -6 -host ${dst_ip} ${ip6a}
- jexec ${jname} sysctl net.inet6.ip6.forwarding=1
+ jexec ${jname}b sysctl net.inet6.ip6.forwarding=1
# As we're doing router-on-the-stick, turn sending IP redirects off:
- jexec ${jname} sysctl net.inet6.ip6.redirect=0
+ jexec ${jname}b sysctl net.inet6.ip6.redirect=0
- atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
+ atf_check -s exit:0 jexec ${jname}a $(atf_get_srcdir)/${script_name} \
--test_name fwd_ip6_icmp \
--smac ${our_mac} --dmac ${jail_mac} \
--sip ${src_ip} --dip ${dst_ip} \
--iface ${epair}a
# check counters are valid
- atf_check -o match:'1 packet forwarded' jexec ${jname} netstat -sp ip6
+ atf_check -o match:'1 packet forwarded' jexec ${jname}b netstat -sp ip6
}
fwd_ip6_gu_icmp_gw_gu_fast_success_cleanup()
@@ -205,43 +205,43 @@
script_name="../common/sender.py"
- epair=$(vnet_mkepair)
- ifconfig ${epair}a up
- ifconfig ${epair}a inet6 ${ip6a}/${plen}
-
jname="v6t-${id}-${yl}-${xl}"
- vnet_mkjail ${jname} ${epair}b
- jexec ${jname} ifconfig ${epair}b up
- jexec ${jname} ifconfig ${epair}b inet6 ${ip6b}/${plen}
+ epair=$(vnet_mkepair)
+ vnet_mkjail ${jname}a ${epair}a
+ jexec ${jname}a ifconfig ${epair}a up
+ jexec ${jname}a ifconfig ${epair}a inet6 ${ip6a}/${plen}
+ vnet_mkjail ${jname}b ${epair}b
+ jexec ${jname}b ifconfig ${epair}b up
+ jexec ${jname}b ifconfig ${epair}b inet6 ${ip6b}/${plen}
- jail_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
+ jail_mac=`jexec ${jname}b ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
- our_mac=`ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
- our_ll_ip=`ifconfig ${epair}a inet6 | awk '$1~/inet6/&& $2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
+ our_mac=`jexec ${jname}a ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
+ our_ll_ip=`jexec ${jname}a ifconfig ${epair}a inet6 | awk '$1~/inet6/&& $2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
# wait for DAD to complete
- while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
+ while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
- while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
+ while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
# Add static route back to us
- atf_check -s exit:0 -o ignore jexec ${jname} route add -6 -host ${dst_ip} ${our_ll_ip}%${epair}b
+ atf_check -s exit:0 -o ignore jexec ${jname}b route add -6 -host ${dst_ip} ${our_ll_ip}%${epair}b
- jexec ${jname} sysctl net.inet6.ip6.forwarding=1
+ jexec ${jname}b sysctl net.inet6.ip6.forwarding=1
# As we're doing router-on-the-stick, turn sending IP redirects off:
- jexec ${jname} sysctl net.inet6.ip6.redirect=0
+ jexec ${jname}b sysctl net.inet6.ip6.redirect=0
- atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
+ atf_check -s exit:0 jexec ${jname}a $(atf_get_srcdir)/${script_name} \
--test_name fwd_ip6_icmp \
--smac ${our_mac} --dmac ${jail_mac} \
--sip ${src_ip} --dip ${dst_ip} \
--iface ${epair}a
# check counters are valid
- atf_check -o match:'1 packet forwarded' jexec ${jname} netstat -sp ip6
+ atf_check -o match:'1 packet forwarded' jexec ${jname}b netstat -sp ip6
}
fwd_ip6_gu_icmp_gw_ll_fast_success_cleanup()
@@ -279,38 +279,38 @@
script_name="../common/sender.py"
- epair=$(vnet_mkepair)
- ifconfig ${epair}a up
- ifconfig ${epair}a inet6 ${ip6a}/${plen}
-
jname="v6t-${id}-${yl}-${xl}"
- vnet_mkjail ${jname} ${epair}b
- jexec ${jname} ifconfig ${epair}b up
- jexec ${jname} ifconfig ${epair}b inet6 ${ip6b}/${plen}
+ epair=$(vnet_mkepair)
+ vnet_mkjail ${jname}a ${epair}a
+ jexec ${jname}a ifconfig ${epair}a up
+ jexec ${jname}a ifconfig ${epair}a inet6 ${ip6a}/${plen}
+ vnet_mkjail ${jname}b ${epair}b
+ jexec ${jname}b ifconfig ${epair}b up
+ jexec ${jname}b ifconfig ${epair}b inet6 ${ip6b}/${plen}
- jail_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
+ jail_mac=`jexec ${jname}b ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
- our_mac=`ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
+ our_mac=`jexec ${jname}a ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
# wait for DAD to complete
- while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
+ while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
- while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
+ while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
- jexec ${jname} sysctl net.inet6.ip6.forwarding=1
+ jexec ${jname}b sysctl net.inet6.ip6.forwarding=1
# Do not turn off route redirects to ensure slow path is on
- atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
+ atf_check -s exit:0 jexec ${jname}a $(atf_get_srcdir)/${script_name} \
--test_name fwd_ip6_icmp \
--smac ${our_mac} --dmac ${jail_mac} \
--sip ${src_ip} --dip ${ip6a} \
--iface ${epair}a
# check counters are valid
- atf_check -o match:'1 packet forwarded' jexec ${jname} netstat -sp ip6
+ atf_check -o match:'1 packet forwarded' jexec ${jname}b netstat -sp ip6
}
fwd_ip6_gu_icmp_iface_slow_success_cleanup()
@@ -319,8 +319,8 @@
}
atf_test_case "fwd_ip6_gu_icmp_gw_gu_slow_success" "cleanup"
-fwd_ip6_gu_icmp_gw_gu_slow_success_head() {
-
+fwd_ip6_gu_icmp_gw_gu_slow_success_head()
+{
atf_set descr 'Test valid IPv6 global unicast fast-forwarding to GU gw'
atf_set require.user root
atf_set require.progs scapy
@@ -349,43 +349,42 @@
script_name="../common/sender.py"
- epair=$(vnet_mkepair)
- ifconfig ${epair}a up
- ifconfig ${epair}a inet6 ${ip6a}/${plen}
-
jname="v6t-${id}-${yl}-${xl}"
- vnet_mkjail ${jname} ${epair}b
- jexec ${jname} ifconfig ${epair}b up
- jexec ${jname} ifconfig ${epair}b inet6 ${ip6b}/${plen}
+ epair=$(vnet_mkepair)
+ vnet_mkjail ${jname}a ${epair}a
+ jexec ${jname}a ifconfig ${epair}a up
+ jexec ${jname}a ifconfig ${epair}a inet6 ${ip6a}/${plen}
+ vnet_mkjail ${jname}b ${epair}b
+ jexec ${jname}b ifconfig ${epair}b up
+ jexec ${jname}b ifconfig ${epair}b inet6 ${ip6b}/${plen}
- jail_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
+ jail_mac=`jexec ${jname}b ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
- our_mac=`ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
+ our_mac=`jexec ${jname}a ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
# wait for DAD to complete
- while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
+ while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
- while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
+ while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
# Add static route back to us
- jexec ${jname} route add -6 -host ${dst_ip} ${ip6a}
+ jexec ${jname}b route add -6 -host ${dst_ip} ${ip6a}
- jexec ${jname} sysctl net.inet6.ip6.forwarding=1
+ jexec ${jname}b sysctl net.inet6.ip6.forwarding=1
# Do not turn off route redirects to ensure slow path is on
- atf_check -s exit:0 \
- $(atf_get_srcdir)/${script_name} \
+ atf_check -s exit:0 jexec ${jname}a $(atf_get_srcdir)/${script_name} \
--test_name fwd_ip6_icmp \
--smac ${our_mac} --dmac ${jail_mac} \
--sip ${src_ip} --dip ${dst_ip} \
--iface ${epair}a
- jexec ${jname} netstat -sp ip6
+ jexec ${jname}b netstat -sp ip6
# check counters are valid
- atf_check -o match:'1 packet forwarded' jexec ${jname} netstat -sp ip6
+ atf_check -o match:'1 packet forwarded' jexec ${jname}b netstat -sp ip6
}
fwd_ip6_gu_icmp_gw_gu_slow_success_cleanup()
@@ -425,42 +424,42 @@
script_name="../common/sender.py"
- epair=$(vnet_mkepair)
- ifconfig ${epair}a up
- ifconfig ${epair}a inet6 ${ip6a}/${plen}
-
jname="v6t-${id}-${yl}-${xl}"
- vnet_mkjail ${jname} ${epair}b
- jexec ${jname} ifconfig ${epair}b up
- jexec ${jname} ifconfig ${epair}b inet6 ${ip6b}/${plen}
+ epair=$(vnet_mkepair)
+ vnet_mkjail ${jname}a ${epair}a
+ jexec ${jname}a ifconfig ${epair}a up
+ jexec ${jname}a ifconfig ${epair}a inet6 ${ip6a}/${plen}
+ vnet_mkjail ${jname}b ${epair}b
+ jexec ${jname}b ifconfig ${epair}b up
+ jexec ${jname}b ifconfig ${epair}b inet6 ${ip6b}/${plen}
- jail_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
+ jail_mac=`jexec ${jname}b ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'`
- our_mac=`ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
- our_ll_ip=`ifconfig ${epair}a inet6 | awk '$1~/inet6/&& $2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
+ our_mac=`jexec ${jname}a ifconfig ${epair}a ether | awk '$1~/ether/{print$2}'`
+ our_ll_ip=`jexec ${jname}a ifconfig ${epair}a inet6 | awk '$1~/inet6/&& $2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
# wait for DAD to complete
- while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
+ while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
- while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
+ while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
sleep 0.1
done
# Add static route back to us
- atf_check -s exit:0 -o ignore jexec ${jname} route add -6 -host ${dst_ip} ${our_ll_ip}%${epair}b
+ atf_check -s exit:0 -o ignore jexec ${jname}b route add -6 -host ${dst_ip} ${our_ll_ip}%${epair}b
- jexec ${jname} sysctl net.inet6.ip6.forwarding=1
+ jexec ${jname}b sysctl net.inet6.ip6.forwarding=1
# Do not turn off route redirects to ensure slow path is on
- atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
+ atf_check -s exit:0 jexec ${jname}a $(atf_get_srcdir)/${script_name} \
--test_name fwd_ip6_icmp \
--smac ${our_mac} --dmac ${jail_mac} \
--sip ${src_ip} --dip ${dst_ip} \
--iface ${epair}a
# check counters are valid
- atf_check -o match:'1 packet forwarded' jexec ${jname} netstat -sp ip6
+ atf_check -o match:'1 packet forwarded' jexec ${jname}b netstat -sp ip6
}
fwd_ip6_gu_icmp_gw_ll_slow_success_cleanup()
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 17, 2:49 PM (8 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27695228
Default Alt Text
D39420.diff (21 KB)
Attached To
Mode
D39420: netinet tests: Enable parallelization of forwarding tests
Attached
Detach File
Event Timeline
Log In to Comment