Blob Blame History Raw
From 031e2f7bb8aea447cd87e455b184106acb4aa435 Mon Sep 17 00:00:00 2001
From: pallotron <pallotron@fb.com>
Date: Wed, 5 Apr 2017 00:23:36 -0700
Subject: [PATCH] more ipv6 improvements

---
 modules.d/40network/net-lib.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index fea45be2..71a665cd 100755
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -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))