WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] network-bridge: Fix do_ifup in the case o

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] network-bridge: Fix do_ifup in the case of ${bridge} != ${netdev}
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Apr 2009 23:03:01 -0700
Delivery-date: Tue, 07 Apr 2009 23:07:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1238669290 -3600
# Node ID 2f6ed9318c033f8918590f99f16655fe29e7fb25
# Parent  6dc5c26a75b90b04e7ed73cebd4643897f26c7c7
network-bridge: Fix do_ifup in the case of ${bridge} != ${netdev}

On RHEL5.2, ifup ${bridge} fails if ${bridge} != ${netdev},
because RHEL5.2's ifup ${bridge} runs the following sequence:

1. Search CONFIG that has the same mac address of ${bridge}.=20
   ifcfg-${netdev} is found.
2. Run "ip link set dev ${netdev} up".
   # ${bridge} is expected.
3. Output "Failed to bring up ${netdev}."
   Because ${netdev} does not exist.

Thus, do_ifup() should not use ifup if ${bridge} != ${netdev}.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
---
 tools/hotplug/Linux/network-bridge |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 6dc5c26a75b9 -r 2f6ed9318c03 tools/hotplug/Linux/network-bridge
--- a/tools/hotplug/Linux/network-bridge        Thu Apr 02 07:53:11 2009 +0100
+++ b/tools/hotplug/Linux/network-bridge        Thu Apr 02 11:48:10 2009 +0100
@@ -106,7 +106,7 @@ get_ip_info() {
 }
     
 do_ifup() {
-    if ! ifup $1 ; then
+    if [ $1 != "${netdev}" ] || ! ifup $1 ; then
         if [ -n "$addr_pfx" ] ; then
             # use the info from get_ip_info()
             ip addr flush $1
@@ -223,9 +223,9 @@ op_start () {
 
     preiftransfer ${netdev}
     transfer_addrs ${netdev} ${tdev}
+    # Remember the IP details for do_ifup.
+    get_ip_info ${netdev}
     if ! ifdown ${netdev}; then
-       # If ifdown fails, remember the IP details.
-       get_ip_info ${netdev}
        ip link set ${netdev} down
        ip addr flush ${netdev}
     fi

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] network-bridge: Fix do_ifup in the case of ${bridge} != ${netdev}, Xen patchbot-unstable <=