The script fails if IPv6 is enabled due to an erroneous routine to extract the ip address. Fixes: disable IPv6 or apply patch Reproducible: Always Steps to Reproduce: 1.enable IPv6 2.add xend to default runlevel 3.reboot Actual Results: No network connectivity Expected Results: Network connectivity patch attached --- /etc/xen/scripts/network-bridge.bak 2008-02-07 15:51:02.000000000 +0100 +++ /etc/xen/scripts/network-bridge 2008-02-07 14:58:48.000000000 +0100 @@ -70,7 +70,8 @@ vif0="vif0.${vifnum}" 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 -e '^ *inet '|sed -e 's/\s*inet\s*//' -e 's/\s*brd.*//' -e 's/\s*scope.*//'` + gateway=`ip route show dev $1 | fgrep default | sed 's/default via //'` }
Created attachment 142886 [details, diff] PATCH This patch solves the problem but should be tested.
Continue in the pending bug please. *** This bug has been marked as a duplicate of bug 111684 ***
I don't have ipv6 easily available to me, could you please attach the output ip addr show dev <interface> so I can double check your change? Also, it looks like you are filtering out the broadcast address which must be kept since ip will probably guess the wrong one later in the script.
(In reply to comment #3) > I don't have ipv6 easily available to me, could you please attach the output ip > addr show dev <interface> so I can double check your change? Also, it looks > like you are filtering out the broadcast address which must be kept since ip > will probably guess the wrong one later in the script. > hi, this is the output of ip addr sh eth0 4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue link/ether 00:18:f3:41:2f:05 brd ff:ff:ff:ff:ff:ff inet 192.168.10.142/24 scope global eth0 inet6 fe80::218:f3ff:fe41:2f05/64 scope link valid_lft forever preferred_lft forever and the resulting addr_pfx is 192.168.10.142/24. This patch does not add ipv6 functionality to Xen, it just fixes a parsing bug to bring up the bridge with a valid ipv4 address, if ipv6 is enabled.