aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>2005-01-24 20:37:34 +0000
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>2005-01-24 20:37:34 +0000
commitaac66e34a6f0fd9a3e084945cf5e6a4b9eb9fd56 (patch)
tree42791a6dea4b0da3da154e7613c56e4d9b298858
parent8febb23b3dd3def288a1f71222c5d68fa585c4fc (diff)
downloadxen-aac66e34a6f0fd9a3e084945cf5e6a4b9eb9fd56.tar.gz
xen-aac66e34a6f0fd9a3e084945cf5e6a4b9eb9fd56.tar.bz2
xen-aac66e34a6f0fd9a3e084945cf5e6a4b9eb9fd56.zip
bitkeeper revision 1.1159.226.3 (41f55c8er11pRwXCJ66we1vDzrEZ9Q)
With ipv6, every network interface always has a link local address. This fools the network script into thinking that xen-br0 already has a network address, and it refuses to transfer over eth0's IP address to xen-br0. By grepping for 'inet ' instead of just 'inet', the network script is no longer fooled and does the right thing. This patch makes Xen networking work again on my Fedora system. Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: ian.pratt@cl.cam.ac.uk
-rwxr-xr-xtools/examples/network4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/examples/network b/tools/examples/network
index b679b93e43..229881d737 100755
--- a/tools/examples/network
+++ b/tools/examples/network
@@ -61,13 +61,13 @@ transfer_addrs () {
local src=$1
local dst=$2
# Don't bother if $dst already has IP addresses.
- if ip addr show dev ${dst} | egrep -q '^ *inet' ; then
+ if ip addr show dev ${dst} | egrep -q '^ *inet ' ; then
return
fi
# Address lines start with 'inet' and have the device in them.
# Replace 'inet' with 'ip addr add' and change the device name $src
# to 'dev $src'. Remove netmask as we'll add routes later.
- ip addr show dev ${src} | egrep '^ *inet' | sed -e "
+ ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
s/inet/ip addr add/
s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\)/[0-9]\+@\1@
s/${src}/dev ${dst}/