Lines Matching +full:route +full:- +full:up

1 #!/usr/bin/env atf-sh
2 #-
3 # SPDX-License-Identifier: BSD-2-Clause
35 atf_set descr 'Test valid IPv6 global unicast fast-forwarding to interface'
44 if [ $$ -gt 65535 ]; then
45 xl=`printf "%x" $(($$ - 65535))`
63 ifconfig ${epair}a up
66 jname="v6t-${id}-${yl}-${xl}"
68 jexec ${jname} ifconfig ${epair}b up
76 while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
79 while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
84 # As we're doing router-on-the-stick, turn sending IP redirects off:
87 atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
88 --test_name fwd_ip6_icmp \
89 --smac ${our_mac} --dmac ${jail_mac} \
90 --sip ${src_ip} --dip ${ip6a} \
91 --iface ${epair}a
94 atf_check -o match:'1 packet forwarded' jexec ${jname} netstat -sp ip6
105 atf_set descr 'Test valid IPv6 global unicast fast-forwarding to GU gw'
114 if [ $$ -gt 65535 ]; then
115 xl=`printf "%x" $(($$ - 65535))`
134 ifconfig ${epair}a up
137 jname="v6t-${id}-${yl}-${xl}"
139 jexec ${jname} ifconfig ${epair}b up
147 while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
150 while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
154 # Add static route back to us
155 jexec ${jname} route add -6 -host ${dst_ip} ${ip6a}
158 # As we're doing router-on-the-stick, turn sending IP redirects off:
161 atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
162 --test_name fwd_ip6_icmp \
163 --smac ${our_mac} --dmac ${jail_mac} \
164 --sip ${src_ip} --dip ${dst_ip} \
165 --iface ${epair}a
168 atf_check -o match:'1 packet forwarded' jexec ${jname} netstat -sp ip6
179 atf_set descr 'Test valid IPv6 global unicast fast-forwarding to LL gw'
188 if [ $$ -gt 65535 ]; then
189 xl=`printf "%x" $(($$ - 65535))`
208 ifconfig ${epair}a up
211 jname="v6t-${id}-${yl}-${xl}"
213 jexec ${jname} ifconfig ${epair}b up
219 …our_ll_ip=`ifconfig ${epair}a inet6 | awk '$1~/inet6/&& $2~/^fe80:/{print$2}' | awk -F% '{print$1}…
222 while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
225 while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
229 # Add static route back to us
230 atf_check -s exit:0 -o ignore jexec ${jname} route add -6 -host ${dst_ip} ${our_ll_ip}%${epair}b
233 # As we're doing router-on-the-stick, turn sending IP redirects off:
236 atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
237 --test_name fwd_ip6_icmp \
238 --smac ${our_mac} --dmac ${jail_mac} \
239 --sip ${src_ip} --dip ${dst_ip} \
240 --iface ${epair}a
243 atf_check -o match:'1 packet forwarded' jexec ${jname} netstat -sp ip6
254 atf_set descr 'Test valid IPv6 global unicast fast-forwarding to interface'
263 if [ $$ -gt 65535 ]; then
264 xl=`printf "%x" $(($$ - 65535))`
282 ifconfig ${epair}a up
285 jname="v6t-${id}-${yl}-${xl}"
287 jexec ${jname} ifconfig ${epair}b up
295 while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
298 while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
303 # Do not turn off route redirects to ensure slow path is on
305 atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
306 --test_name fwd_ip6_icmp \
307 --smac ${our_mac} --dmac ${jail_mac} \
308 --sip ${src_ip} --dip ${ip6a} \
309 --iface ${epair}a
312 atf_check -o match:'1 packet forwarded' jexec ${jname} netstat -sp ip6
323 atf_set descr 'Test valid IPv6 global unicast fast-forwarding to GU gw'
332 if [ $$ -gt 65535 ]; then
333 xl=`printf "%x" $(($$ - 65535))`
352 ifconfig ${epair}a up
355 jname="v6t-${id}-${yl}-${xl}"
357 jexec ${jname} ifconfig ${epair}b up
365 while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
368 while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
372 # Add static route back to us
373 jexec ${jname} route add -6 -host ${dst_ip} ${ip6a}
376 # Do not turn off route redirects to ensure slow path is on
378 atf_check -s exit:0 \
380 --test_name fwd_ip6_icmp \
381 --smac ${our_mac} --dmac ${jail_mac} \
382 --sip ${src_ip} --dip ${dst_ip} \
383 --iface ${epair}a
384 jexec ${jname} netstat -sp ip6
387 atf_check -o match:'1 packet forwarded' jexec ${jname} netstat -sp ip6
398 atf_set descr 'Test valid IPv6 global unicast fast-forwarding to LL gw'
407 if [ $$ -gt 65535 ]; then
408 xl=`printf "%x" $(($$ - 65535))`
427 ifconfig ${epair}a up
430 jname="v6t-${id}-${yl}-${xl}"
432 jexec ${jname} ifconfig ${epair}b up
438 …our_ll_ip=`ifconfig ${epair}a inet6 | awk '$1~/inet6/&& $2~/^fe80:/{print$2}' | awk -F% '{print$1}…
441 while [ `jexec ${jname} ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
444 while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
448 # Add static route back to us
449 atf_check -s exit:0 -o ignore jexec ${jname} route add -6 -host ${dst_ip} ${our_ll_ip}%${epair}b
452 # Do not turn off route redirects to ensure slow path is on
454 atf_check -s exit:0 $(atf_get_srcdir)/${script_name} \
455 --test_name fwd_ip6_icmp \
456 --smac ${our_mac} --dmac ${jail_mac} \
457 --sip ${src_ip} --dip ${dst_ip} \
458 --iface ${epair}a
461 atf_check -o match:'1 packet forwarded' jexec ${jname} netstat -sp ip6
477 jname="v6t-fwd_ip6_blackhole"
484 ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad
487 jexec ${jname} ifconfig lo0 inet6 ::1/128 up no_dad
488 jexec ${jname} ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad
489 jexec ${jname} ifconfig ${epair_out}b inet6 2001:db8:1::1/64 up no_dad
492 route -6 add default 2001:db8::1
494 atf_check -s exit:2 -o ignore \
495 ping6 -c 1 -t 1 2001:db8:1::2
496 atf_check -s exit:0 -o match:"0 packets not forwardable" \
497 jexec ${jname} netstat -s -p ip6
499 # Create blackhole route
500 jexec ${jname} route -6 add 2001:db8:1::2 -blackhole
504 atf_check -s exit:2 -o ignore \
505 ping6 -c 1 -t 1 2001:db8:1::2
506 atf_check -s exit:0 -o match:"1 packet not forwardable" \
507 jexec ${jname} netstat -s -p ip6
511 atf_check -s exit:2 -o ignore \
512 ping6 -c 1 -t 1 2001:db8:1::2
513 atf_check -s exit:0 -o match:"2 packets not forwardable" \
514 jexec ${jname} netstat -s -p ip6