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

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