Blame SOURCES/0245-network-dhcp-wait_for_ipv6_dad-in-PREINIT6.patch

712866
From 10e5b14705e5bb732e66e8f08317529aa7bc8017 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Thu, 7 May 2015 14:42:10 +0200
712866
Subject: [PATCH] network:dhcp:wait_for_ipv6_dad() in PREINIT6
712866
712866
---
712866
 modules.d/40network/dhclient-script.sh | 3 ++-
712866
 modules.d/40network/net-lib.sh         | 2 +-
712866
 2 files changed, 3 insertions(+), 2 deletions(-)
712866
712866
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
5c6c2a
index 885303a2..aef94d6c 100755
712866
--- a/modules.d/40network/dhclient-script.sh
712866
+++ b/modules.d/40network/dhclient-script.sh
712866
@@ -95,8 +95,9 @@ case $reason in
712866
         ;;
712866
 
712866
     PREINIT6)
712866
-        echo "dhcp: PREINIT $netif up"
712866
+        echo "dhcp: PREINIT6 $netif up"
712866
         linkup $netif
712866
+        wait_for_ipv6_dad $netif
712866
         ;;
712866
 
712866
     BOUND)
712866
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
5c6c2a
index 89b1101d..220480b2 100755
712866
--- a/modules.d/40network/net-lib.sh
712866
+++ b/modules.d/40network/net-lib.sh
712866
@@ -522,7 +522,7 @@ wait_for_ipv6_dad() {
712866
     local cnt=0
712866
     local li
712866
     while [ $cnt -lt 500 ]; do
712866
-        li=$(ip -6 addr show dev $1)
712866
+        li=$(ip -6 addr show dev $1 scope link)
712866
         strstr "$li" "tentative" || return 0
712866
         sleep 0.1
712866
         cnt=$(($cnt+1))