Blame SOURCES/0002-ifup-do-not-dhcp-on-network-interface-of-secondary-s.patch

712866
From da63c0de561ce9ed158cc2438a1cc5fbb38c3758 Mon Sep 17 00:00:00 2001
712866
From: WANG Chao <chaowang@redhat.com>
712866
Date: Fri, 13 Sep 2013 22:28:44 +0800
712866
Subject: [PATCH] ifup: do not dhcp on network interface of secondary stack
712866
712866
Configure cmdline to:
712866
 ip=br0:dhcp bridge=br0:bond0 bond=bond0:eth0
712866
712866
By default ifup bond0 will run dhcp on bond0, which is wrong. bond0
712866
isn't the top interface. we should really run dhcp on br0.
712866
712866
So if we ifup an network interface on secondary stack, we should not
712866
dhcp. Fix this issue with this patch.
712866
---
712866
 modules.d/40network/ifup.sh | 7 +++++++
712866
 1 file changed, 7 insertions(+)
712866
712866
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
5c6c2a
index 32616470..9f6f4494 100755
712866
--- a/modules.d/40network/ifup.sh
712866
+++ b/modules.d/40network/ifup.sh
712866
@@ -336,6 +336,13 @@ for p in $(getargs ip=); do
712866
     exit 0
712866
 done
712866
 
712866
+# netif isn't the top stack? Then we should exit here.
712866
+# eg. netif is bond0. br0 is on top of it. dhcp br0 is correct but dhcp
712866
+#     bond0 doesn't make sense.
712866
+if [ -n "$DO_BOND_SETUP" -o -n "$DO_TEAM_SETUP" -o -n "$DO_VLAN_SETUP" ]; then
712866
+    exit 0
712866
+fi
712866
+
712866
 # no ip option directed at our interface?
712866
 if [ ! -e /tmp/setup_net_${netif}.ok ]; then
712866
     do_dhcp -4