|
Harald Hoyer |
3763a8 |
From 96b708e178930b0891daab8dcc9d1d7375637a29 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
3763a8 |
From: pallotron <pallotron@fb.com>
|
|
Harald Hoyer |
3763a8 |
Date: Wed, 5 Apr 2017 00:15:16 -0700
|
|
Harald Hoyer |
3763a8 |
Subject: [PATCH] more ipv6 improvements
|
|
Harald Hoyer |
3763a8 |
|
|
Harald Hoyer |
3763a8 |
---
|
|
Harald Hoyer |
3763a8 |
modules.d/40network/net-lib.sh | 8 ++++++--
|
|
Harald Hoyer |
3763a8 |
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
Harald Hoyer |
3763a8 |
|
|
Harald Hoyer |
3763a8 |
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
|
Harald Hoyer |
3763a8 |
index b74fdbdd..e0f761f3 100755
|
|
Harald Hoyer |
3763a8 |
--- a/modules.d/40network/net-lib.sh
|
|
Harald Hoyer |
3763a8 |
+++ b/modules.d/40network/net-lib.sh
|
|
Harald Hoyer |
3763a8 |
@@ -653,7 +653,9 @@ wait_for_ipv6_dad_link() {
|
|
Harald Hoyer |
3763a8 |
timeout=$(($timeout*10))
|
|
Harald Hoyer |
3763a8 |
|
|
Harald Hoyer |
3763a8 |
while [ $cnt -lt $timeout ]; do
|
|
Harald Hoyer |
3763a8 |
+ echo "wait_for_ipv6_dad_link..." 1>&2
|
|
Harald Hoyer |
3763a8 |
[ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \
|
|
Harald Hoyer |
3763a8 |
+ && [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \
|
|
Harald Hoyer |
3763a8 |
&& return 0
|
|
Harald Hoyer |
3763a8 |
[ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \
|
|
Harald Hoyer |
3763a8 |
&& return 1
|
|
Harald Hoyer |
3763a8 |
@@ -670,8 +672,9 @@ wait_for_ipv6_dad() {
|
|
Harald Hoyer |
3763a8 |
timeout=$(($timeout*10))
|
|
Harald Hoyer |
3763a8 |
|
|
Harald Hoyer |
3763a8 |
while [ $cnt -lt $timeout ]; do
|
|
Harald Hoyer |
3763a8 |
+ echo "wait_for_ipv6_dad..." 1>&2
|
|
Harald Hoyer |
3763a8 |
[ -z "$(ip -6 addr show dev "$1" tentative)" ] \
|
|
Harald Hoyer |
3763a8 |
- && [ -n "$(ip -6 route list proto ra dev "$1")" ] \
|
|
Harald Hoyer |
3763a8 |
+ && [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \
|
|
Harald Hoyer |
3763a8 |
&& return 0
|
|
Harald Hoyer |
3763a8 |
[ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \
|
|
Harald Hoyer |
3763a8 |
&& return 1
|
|
Harald Hoyer |
3763a8 |
@@ -688,8 +691,9 @@ wait_for_ipv6_auto() {
|
|
Harald Hoyer |
3763a8 |
timeout=$(($timeout*10))
|
|
Harald Hoyer |
3763a8 |
|
|
Harald Hoyer |
3763a8 |
while [ $cnt -lt $timeout ]; do
|
|
Harald Hoyer |
3763a8 |
+ echo "wait_for_ipv6_auto..." 1>&2
|
|
Harald Hoyer |
3763a8 |
[ -z "$(ip -6 addr show dev "$1" tentative)" ] \
|
|
Harald Hoyer |
3763a8 |
- && [ -n "$(ip -6 route list proto ra dev "$1")" ] \
|
|
Harald Hoyer |
3763a8 |
+ && [ -n "$(ip -6 route list proto ra dev "$1" | grep default)" ] \
|
|
Harald Hoyer |
3763a8 |
&& return 0
|
|
Harald Hoyer |
3763a8 |
sleep 0.1
|
|
Harald Hoyer |
3763a8 |
cnt=$(($cnt+1))
|