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/
Home Products Support Community News


[Xen-bugs] [Bug 1142] Network-bridge script fails to copy the IP address

To: xen-bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-bugs] [Bug 1142] Network-bridge script fails to copy the IP address over if ipv6 is enabled
From: bugzilla-daemon@xxxxxxxxxxxxxxxxxxx
Date: Tue, 12 Feb 2008 20:23:36 -0800
Delivery-date: Tue, 12 Feb 2008 20:23:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <bug-1142-3@xxxxxxxxxxxxxxxxxxxxxxxxxxx/bugzilla/>
List-help: <mailto:xen-bugs-request@lists.xensource.com?subject=help>
List-id: Xen Bugzilla <xen-bugs.lists.xensource.com>
List-post: <mailto:xen-bugs@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=unsubscribe>
Reply-to: bugs@xxxxxxxxxxxxxxxxxx
Sender: xen-bugs-bounces@xxxxxxxxxxxxxxxxxxx

gentoo@xxxxxxxxx changed:

           What    |Removed                     |Added
                 CC|                            |gentoo@xxxxxxxxx

------- Comment #1 from gentoo@xxxxxxxxx  2008-02-12 20:23 -------
The problem resides in the network-bridge script, which can't handle more than
one IP address on the interface. IPv6 is NOT the problem.

If you have multiple IPs (IPv4 and/or IPv6) on the interface the grep in the
"addr_pfx=..." line returns
more than one line and "ip addr add ${addr_pfx} dev $1" will fail. 

I found an approrach to fix this killing interface behavior based on

--- network-bridge.dist 2008-02-13 01:18:07.000000000 +0100
+++ network-bridge      2008-02-13 04:33:40.000000000 +0100
@@ -90,7 +90,7 @@

 get_ip_info() {
-    addr_pfx=`ip addr show dev $1 | egrep '^ *inet' | sed -e 's/ *inet //' -e
+    addr_pfx=`ip addr show dev $1 | grep -v dynamic | egrep '^ *inet' | sed -e
's/ *inet6\? //' -e "s/$1//"`
     gateway=`ip route show dev $1 | fgrep default | sed 's/default via //'`

@@ -99,7 +99,7 @@
         if [ -n "$addr_pfx" ] ; then
             # use the info from get_ip_info()
             ip addr flush $1
-            ip addr add ${addr_pfx} dev $1
+            for address in `echo "${addr_pfx}"`; do ip addr add ${address} dev
$1; done
             ip link set dev $1 up
             [ -n "$gateway" ] && ip route add default via ${gateway}

This patch adds support for multiple IPv4 and v6 addresses on the interface.

Discussed at https://bugs.gentoo.org/show_bug.cgi?id=111684

Configure bugmail: 
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Xen-bugs mailing list

<Prev in Thread] Current Thread [Next in Thread>