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-devel

[Xen-devel] [PATCH]Fix network-bridge ifup problem

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]Fix network-bridge ifup problem
From: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
Date: Mon, 22 Jun 2009 18:00:03 +0800
Delivery-date: Mon, 22 Jun 2009 03:01:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.21 (X11/20090302)
hi,

when we want to setup a bridge without a ip address, function
do_ifup will not activate the bridge.

Eg.

# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:19:B9:41:2C:B9  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5096 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:395457 (386.1 KiB)  TX bytes:0 (0.0 b)
          Interrupt:16 

# ./network-bridge start netdev=eth1 bridge=xenbr1

will leave xenbr1 inactive.

We should make the bridge active, then vif-bridge can work on the bridge.

Signed-off-by: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>

thanks,

zhigang




--- network-bridge      2009-05-19 07:35:20.000000000 +0800
+++ /share/tmp/network-bridge.new       2009-06-22 17:49:46.000000000 +0800
@@ -111,9 +111,9 @@
             # use the info from get_ip_info()
             ip addr flush $1
             ip addr add ${addr_pfx} dev $1
-            ip link set dev $1 up
-            [ -n "$gateway" ] && ip route add default via ${gateway}
         fi
+        ip link set dev $1 up
+        [ -n "$gateway" ] && ip route add default via ${gateway}
     fi
 }
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH]Fix network-bridge ifup problem, Zhigang Wang <=