Blame SOURCES/0420-network-flush-only-IPv4-addresses-on-configuration.patch

18971c
From cc3f588071c35821b55e1db2201b0650df688dcc Mon Sep 17 00:00:00 2001
18971c
From: Harald Hoyer <harald@redhat.com>
18971c
Date: Thu, 30 Jun 2016 11:11:37 +0200
18971c
Subject: [PATCH] network: flush only IPv4 addresses on configuration
18971c
18971c
also flush on dhcp
18971c
---
18971c
 modules.d/40network/ifup.sh | 3 ++-
18971c
 1 file changed, 2 insertions(+), 1 deletion(-)
18971c
18971c
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
18971c
index 19b7bbdc..cedf9a77 100755
18971c
--- a/modules.d/40network/ifup.sh
18971c
+++ b/modules.d/40network/ifup.sh
18971c
@@ -112,6 +112,7 @@ do_dhcp() {
18971c
 
18971c
     [ -n "$macaddr" ] && ip link set address $macaddr dev $netif
18971c
     [ -n "$mtu" ] && ip link set mtu $mtu dev $netif
18971c
+    ip -4 addr flush dev $netif
18971c
 
18971c
     while [ $_COUNT -lt $_DHCPRETRY ]; do
18971c
         info "Starting dhcp for interface $netif"
18971c
@@ -188,7 +189,7 @@ do_static() {
18971c
             warn "Duplicate address detected for $ip for interface $netif."
18971c
             return 1
18971c
         fi
18971c
-        ip addr flush dev $netif
18971c
+        ip -4 addr flush dev $netif
18971c
         ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif
18971c
     fi
18971c