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

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