[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-bugs] [Bug 1142] Network-bridge script fails to copy the IP address over if ipv6 is enabled
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1142 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 http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=332. --- 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 @@ tdev=tmpbridge get_ip_info() { - addr_pfx=`ip addr show dev $1 | egrep '^ *inet' | sed -e 's/ *inet //' -e "s/$1//"` + 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} fi 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: http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. _______________________________________________ Xen-bugs mailing list Xen-bugs@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-bugs
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |