[ovs-dev] [PATCH] rhel: Enable DHCP support for internal ports

Flavio Leitner fbl at redhat.com
Mon Jan 13 20:53:14 UTC 2014


The current initscripts ifup-ovs brings up internal ports as
an ordinary ethernet device, so BOOTPROTO=dhcp|none does not
consider any OVS/bridge detail.

Since DHCP requires a port in the bridge to reach the server,
bring up the required port before in the same way it does for
OVS bridge.

Signed-off-by: Flavio Leitner <fbl at redhat.com>
---
 rhel/etc_sysconfig_network-scripts_ifup-ovs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs
index 3f31c30..3b8bb33 100755
--- a/rhel/etc_sysconfig_network-scripts_ifup-ovs
+++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs
@@ -115,7 +115,12 @@ case "$TYPE" in
 	OVSIntPort)
 		ifup_ovs_bridge
 		ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" type=internal ${OVS_EXTRA+-- $OVS_EXTRA}
-		${OTHERSCRIPT} ${CONFIG} ${2}
+		if [ -n "${OVSDHCPINTERFACES}" ]; then
+			for _iface in "${OVSDHCPINTERFACES}"; do
+				/sbin/ifup ${_iface}
+			done
+		fi
+		BOOTPROTO=${OVSBOOTPROTO} ${OTHERSCRIPT} ${CONFIG} ${2}
 		;;
 	OVSBond)
 		ifup_ovs_bridge
-- 
1.8.4.2




More information about the dev mailing list