more ipv6 improvements

master
pallotron 2017-04-05 00:23:36 -07:00
parent a0545765e8
commit 031e2f7bb8
1 changed files with 3 additions and 3 deletions

View File

@ -654,7 +654,7 @@ wait_for_ipv6_dad_link() {

while [ $cnt -lt $timeout ]; do
[ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \
&& [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \
&& [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \
&& return 0
[ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \
&& return 1
@ -672,7 +672,7 @@ wait_for_ipv6_dad() {

while [ $cnt -lt $timeout ]; do
[ -z "$(ip -6 addr show dev "$1" tentative)" ] \
&& [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \
&& [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \
&& return 0
[ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \
&& return 1
@ -690,7 +690,7 @@ wait_for_ipv6_auto() {

while [ $cnt -lt $timeout ]; do
[ -z "$(ip -6 addr show dev "$1" tentative)" ] \
&& [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \
&& [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \
&& return 0
sleep 0.1
cnt=$(($cnt+1))