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