Lines Matching +full:route +full:- +full:up
35 # arpresolve only checked the default route.
53 # and a non-default fib
58 # diffferent subnet masks, or FIB1 won't have a subnet route.
66 if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then
77 setfib "$FIB0" nping -c 1 -e ${EPAIRA} -S ${SPOOF_ADDR} \
78 --source-mac ${SPOOF_MAC} --icmp --icmp-type "echo-request" \
79 --icmp-code 0 --icmp-id 0xdead --icmp-seq 1 --data 0xbeef \
85 atf_check -o match:"${SPOOF_ADDR}.*expires" setfib "$FIB1" arp ${SPOOF_ADDR}
104 # and a non-default fib
110 if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then
118 # Check whether the host route exists in only the correct FIB
119 setfib ${FIB0} netstat -rn -f inet | grep -q "^${ADDR}.*UHS.*lo0"
120 if [ 0 -ne $? ]; then
121 setfib ${FIB0} netstat -rn -f inet
122 atf_fail "Host route did not appear in the correct FIB"
124 setfib 0 netstat -rn -f inet | grep -q "^${ADDR}.*UHS.*lo0"
125 if [ 0 -eq $? ]; then
126 setfib 0 netstat -rn -f inet
127 atf_fail "Host route appeared in the wrong FIB"
130 # Check whether the network route exists in only the correct FIB
131 setfib ${FIB0} netstat -rn -f inet | \
132 grep -q "^${SUBNET}/${MASK}.*${TAPD}"
133 if [ 0 -ne $? ]; then
134 setfib ${FIB0} netstat -rn -f inet
135 atf_fail "Network route did not appear in the correct FIB"
137 setfib 0 netstat -rn -f inet | \
138 grep -q "^${SUBNET}/${MASK}.*${TAPD}"
139 if [ 0 -eq $? ]; then
140 setfib 0 netstat -rn -f inet
141 atf_fail "Network route appeared in the wrong FIB"
160 # address and a non-default fib
166 if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then
174 # Check whether the host route exists in only the correct FIB
175 setfib ${FIB0} netstat -rn -f inet6 | grep -q "^${ADDR}.*UHS.*lo0"
176 if [ 0 -ne $? ]; then
177 setfib ${FIB0} netstat -rn -f inet6
178 atf_fail "Host route did not appear in the correct FIB"
180 setfib 0 netstat -rn -f inet6 | grep -q "^${ADDR}.*UHS.*lo0"
181 if [ 0 -eq $? ]; then
182 setfib 0 netstat -rn -f inet6
183 atf_fail "Host route appeared in the wrong FIB"
186 # Check whether the network route exists in only the correct FIB
187 setfib ${FIB0} netstat -rn -f inet6 | \
188 grep -q "^${SUBNET}/${MASK}.*${TAPD}"
189 if [ 0 -ne $? ]; then
190 setfib ${FIB0} netstat -rn -f inet6
191 atf_fail "Network route did not appear in the correct FIB"
193 setfib 0 netstat -rn -f inet6 | \
194 grep -q "^${SUBNET}/${MASK}.*${TAPD}"
195 if [ 0 -eq $? ]; then
196 setfib 0 netstat -rn -f inet6
197 atf_fail "Network route appeared in the wrong FIB"
218 # and a non-default fib
226 if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then
238 setfib ${FIB0} route add default ${GATEWAY}
239 setfib ${FIB1} route add default ${GATEWAY}
241 # Verify that the default route exists for both fibs, with their
243 atf_check -o match:"^0\.0\.0\.0.*${TAP0}$" \
244 setfib ${FIB0} netstat -rn -f inet
245 atf_check -o match:"^0\.0\.0\.0.*${TAP1}$" \
246 setfib ${FIB1} netstat -rn -f inet
264 # addresses and non-default FIBs
272 if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then
284 setfib ${FIB0} route -6 add default ${GATEWAY}
285 setfib ${FIB1} route -6 add default ${GATEWAY}
287 # Verify that the default route exists for both fibs, with their
289 atf_check -o match:"^::/0.*${TAP0}$" \
290 setfib ${FIB0} netstat -rn -f inet6
291 atf_check -o match:"^::/0.*${TAP1}$" \
292 setfib ${FIB1} netstat -rn -f inet6
325 ifconfig ${TAP1} -alias ${ADDR}
332 ifconfig ${TAP0} -alias ${ADDR}
350 atf_set "descr" "Can remove an IPv4 alias from an interface when the same address is also assigned to another interface, on non-default FIBs."
355 atf_expect_fail "kern/189088 Assigning the same IP to multiple interfaces in different FIBs creates a host route for only one"
369 ifconfig ${TAP1} -alias ${ADDR}
370 atf_check -o not-match:"^${ADDR}[[:space:]]" \
371 setfib ${FIB1} netstat -rn -f inet
378 ifconfig ${TAP0} -alias ${ADDR}
379 atf_check -o not-match:"^${ADDR}[[:space:]]" \
380 setfib ${FIB0} netstat -rn -f inet
385 # in order for the routes to be correctly cleaned up.
386 for TAPD in `tail -r "ifaces_to_cleanup"`; do
395 atf_set "descr" "Can remove an IPv6 alias from an interface when the same address is also assigned to another interface, on non-default FIBs."
413 atf_check -s exit:0 ifconfig ${TAP1} inet6 ${ADDR} -alias
414 atf_check -o not-match:"^${ADDR}[[:space:]]" \
415 setfib ${FIB1} netstat -rn -f inet6
424 atf_check -s exit:0 ifconfig ${TAP0} inet6 ${ADDR} -alias
425 atf_check -o not-match:"^${ADDR}[[:space:]]" \
426 setfib ${FIB0} netstat -rn -f inet6
436 atf_set "descr" "SLAAC correctly installs routes on non-default FIBs"
443 # addresses and non-default FIBs
444 PREFIX="2001:db8:$(printf "%x" `jot -r 1 0 65535`):$(printf "%x" `jot -r 1 0 65535`)"
451 if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then
456 sysctl -n "net.inet6.ip6.rfc6204w3" >> "rfc6204w3.state"
457 sysctl -n "net.inet6.ip6.forwarding" >> "forwarding.state"
467 echo setfib $FIB1 ifconfig "$EPAIRB" inet6 -ifdisabled accept_rtadv fib $FIB1 up
468 setfib $FIB1 ifconfig "$EPAIRB" inet6 -ifdisabled accept_rtadv fib $FIB1 up
469 rtadvd -p rtadvd.pid -C rtadvd.sock -c /dev/null "$EPAIRA"
473 atf_check -o match:"inet6 ${SUBNET}.*prefixlen ${MASK}.*autoconf" \
475 # Check local route
476 atf_check -o match:"${SUBNET}.*\<UHS\>.*lo0" \
477 netstat -rnf inet6 -F $FIB1
478 # Check subnet route
479 atf_check -o match:"${SUBNET}:/${MASK}.*\<U\>.*$EPAIRB" \
480 netstat -rnf inet6 -F $FIB1
481 # Check default route
482 atf_check -o match:"^::/0.*\<UG\>.*$EPAIRB" \
483 netstat -rnf inet6 -F $FIB1
486 for fib in $( seq 0 $(($(sysctl -n net.fibs) - 1))); do
487 if [ "$fib" = "$FIB1" -o "$fib" = "$FIB0" ]; then
490 atf_check -o not-match:"${SUBNET}.*\<UHS\>.*lo0" \
491 netstat -rnf inet6 -F $fib
492 atf_check -o not-match:"${SUBNET}:/${MASK}.*\<U\>.*$EPAIRB" \
493 netstat -rnf inet6 -F $fib
494 atf_check -o not-match:"default.*\<UG\>.*$EPAIRB" \
495 netstat -rnf inet6 -F $fib
500 if [ -f "rtadvd.pid" ]; then
505 pkill -kill -F rtadvd.pid
506 rm -f rtadvd.pid
509 if [ -f "forwarding.state" ] ; then
513 if [ -f "rfc6204w3.state" ] ; then
530 # and a non-default fib
537 if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then
546 # Check that a subnet route exists on both fibs
547 atf_check -o ignore setfib "$FIB0" route get $ADDR1
548 atf_check -o ignore setfib "$FIB1" route get $ADDR0
566 # and a non-default fib
573 if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then
582 # Check that a subnet route exists on both fibs
583 atf_check -o ignore setfib "$FIB0" route -6 get $ADDR1
584 atf_check -o ignore setfib "$FIB1" route -6 get $ADDR0
593 # SO_DONTROUTE set that are sent on non-default FIBs.
594 # This bug was discovered with "setfib 1 netperf -t UDP_STREAM -H some_host"
598 # would return an address from an interface on any FIB that had a subnet route
601 # default route, then trying to send a UDP packet with SO_DONTROUTE set to an
603 # in_pcbladdr would choose an interface on any FIB with a default route. With
608 atf_set "descr" "Source address selection for UDP packets with SO_DONTROUTE on non-default FIBs works"
615 # and a non-default fib
625 if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then
637 atf_check -o ignore setfib ${FIB0} \
646 atf_check -o ignore setfib ${FIB1} \
658 atf_set "descr" "Source address selection for UDP IPv6 packets with SO_DONTROUTE on non-default FIBs works"
668 # and a non-default fib
678 if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then
692 atf_check -o ignore setfib ${FIB0} \
693 ${SRCDIR}/udp_dontroute -6 ${TARGET} /dev/${TARGET_TAP}
701 atf_check -o ignore setfib ${FIB1} \
702 ${SRCDIR}/udp_dontroute -6 ${TARGET} /dev/${TARGET_TAP}
728 # Looks up one or more fibs from the configuration data and validates them.
735 net_fibs=`sysctl -n net.fibs`
736 if [ $net_fibs -lt $(($NUMFIBS + 1)) ]; then
737 atf_check -o ignore sysctl net.fibs=$(($NUMFIBS + 1))
738 net_fibs=`sysctl -n net.fibs`
741 while [ $i -lt "$NUMFIBS" ]; do
754 if (which pfctl && pfctl -s info | grep -q 'Status: Enabled') ||
755 [ `sysctl -n net.inet.ip.fw.enable` = "1" ] ||
756 (which ipf && ipf -V); then
761 # Record the epair device so we can clean it up later
777 # Record the TAP device so we can clean it up later
821 if [ -f ifaces_to_cleanup ]; then
826 rm -f ifaces_to_cleanup