Blame SOURCES/0519-network-ifup-don-t-arping-for-point-to-point-connect.patch

5c6c2a
From 0259f1c246d3c5b7cf9cb234571e025e529e8716 Mon Sep 17 00:00:00 2001
5c6c2a
From: Harald Hoyer <harald@redhat.com>
5c6c2a
Date: Mon, 7 Aug 2017 15:09:13 +0200
5c6c2a
Subject: [PATCH] network/ifup: don't arping for point-to-point connections
5c6c2a
5c6c2a
https://bugzilla.redhat.com/show_bug.cgi?id=1477339
5c6c2a
5c6c2a
Cherry-picked from: 5abd692fe46215c38f564b59db50193daf745af5
5c6c2a
Resolves: #1477339
5c6c2a
---
5c6c2a
 modules.d/40network/ifup.sh | 8 +++++---
5c6c2a
 1 file changed, 5 insertions(+), 3 deletions(-)
5c6c2a
5c6c2a
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
5c6c2a
index b3219fc1..9ed48155 100755
5c6c2a
--- a/modules.d/40network/ifup.sh
5c6c2a
+++ b/modules.d/40network/ifup.sh
5c6c2a
@@ -118,9 +118,11 @@ do_static() {
5c6c2a
         ip addr add $ip/$mask ${srv:+peer $srv} dev $netif
5c6c2a
         wait_for_ipv6_dad $netif
5c6c2a
     else
5c6c2a
-        if ! arping -f -q -D -c 2 -I $netif $ip; then
5c6c2a
-            warn "Duplicate address detected for $ip for interface $netif."
5c6c2a
-            return 1
5c6c2a
+        if [ -z "$srv" ]; then
5c6c2a
+            if ! arping -f -q -D -c 2 -I $netif $ip; then
5c6c2a
+                warn "Duplicate address detected for $ip for interface $netif."
5c6c2a
+                return 1
5c6c2a
+            fi
5c6c2a
         fi
5c6c2a
         ip -4 addr flush dev $netif
5c6c2a
         ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif