]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network/ifup: don't arping for point-to-point connections
authorHarald Hoyer <harald@redhat.com>
Mon, 7 Aug 2017 13:09:13 +0000 (15:09 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 7 Aug 2017 13:09:36 +0000 (15:09 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=1477339

modules.d/40network/ifup.sh

index f979b59bc64fcd7f1a40c9ed8639db84680e0966..687b5707ff3fac9d60480dc15b0985ae703d829c 100755 (executable)
@@ -113,15 +113,17 @@ do_static() {
         echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_redirects
         wait_for_ipv6_dad $netif
     else
-        if command -v arping2 >/dev/null; then
-            if arping2 -q -C 1 -c 2 -I $netif -0 $ip ; then
-                warn "Duplicate address detected for $ip for interface $netif."
-                return 1
-            fi
-        else
-            if ! arping -f -q -D -c 2 -I $netif $ip ; then
-                warn "Duplicate address detected for $ip for interface $netif."
-                return 1
+        if [ -z "$srv" ]; then
+            if command -v arping2 >/dev/null; then
+                if arping2 -q -C 1 -c 2 -I $netif -0 $ip ; then
+                    warn "Duplicate address detected for $ip for interface $netif."
+                    return 1
+                fi
+            else
+                if ! arping -f -q -D -c 2 -I $netif $ip ; then
+                    warn "Duplicate address detected for $ip for interface $netif."
+                    return 1
+                fi
             fi
         fi
         ip addr flush dev $netif