Blame SOURCES/0567-net-lib-check-if-addr-exists-before-checking-for-dad.patch

d84178
From 6b827761075266ebaf1ef10cc0a640445f02dbe1 Mon Sep 17 00:00:00 2001
d84178
From: Lukas Nykryn <lnykryn@redhat.com>
d84178
Date: Mon, 7 Oct 2019 16:48:09 +0200
d84178
Subject: [PATCH] net-lib: check if addr exists before checking for dad state
d84178
d84178
Before we check if dad is done we should first make sure,
d84178
that there is a link local address where we do the check.
d84178
d84178
Due to this issue, on ipv6 only setups sometimes dhclient started
d84178
asking for ip address, before the link local address was present
d84178
and failed immediately.
d84178
---
d84178
 modules.d/40network/net-lib.sh | 2 ++
d84178
 1 file changed, 2 insertions(+)
d84178
d84178
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
d84178
index 35e6e833..3f2fc712 100755
d84178
--- a/modules.d/40network/net-lib.sh
d84178
+++ b/modules.d/40network/net-lib.sh
d84178
@@ -645,6 +645,7 @@ wait_for_ipv6_dad_link() {
d84178
     timeout=$(($timeout*10))
d84178
 
d84178
     while [ $cnt -lt $timeout ]; do
d84178
+        [ -n "$(ip -6 addr show dev "$1" scope link)" ] \
d84178
         [ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \
d84178
             && return 0
d84178
         [ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \
d84178
@@ -662,6 +663,7 @@ wait_for_ipv6_dad() {
d84178
     timeout=$(($timeout*10))
d84178
 
d84178
     while [ $cnt -lt $timeout ]; do
d84178
+        [ -n "$(ip -6 addr show dev "$1")" ] \
d84178
         [ -z "$(ip -6 addr show dev "$1" tentative)" ] \
d84178
             && return 0
d84178
         [ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \