Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 209240 - [PATCH] app-emulation/xen-tools network-bridge script
Summary: [PATCH] app-emulation/xen-tools network-bridge script
Status: RESOLVED DUPLICATE of bug 111684
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-07 14:07 UTC by Daniel Walter
Modified: 2008-02-07 23:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
PATCH (xen-network-bridge.patch,504 bytes, patch)
2008-02-07 14:08 UTC, Daniel Walter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Walter 2008-02-07 14:07:24 UTC
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 //'`
 }
Comment 1 Daniel Walter 2008-02-07 14:08:52 UTC
Created attachment 142886 [details, diff]
PATCH 

This patch solves the problem but should be tested.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2008-02-07 15:46:12 UTC
Continue in the pending bug please.

*** This bug has been marked as a duplicate of bug 111684 ***
Comment 3 Micheal Marineau (RETIRED) gentoo-dev 2008-02-07 18:16:30 UTC
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.
Comment 4 Daniel Walter 2008-02-07 23:37:07 UTC
(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.