WARNING - OLD ARCHIVES

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

xen-devel

[Xen-devel] [PATCH] make network script not break with ipv6

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] make network script not break with ipv6
From: Rik van Riel <riel@xxxxxxxxxx>
Date: Mon, 24 Jan 2005 13:56:49 -0500 (EST)
Delivery-date: Mon, 24 Jan 2005 18:58:11 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxx>

--- xen-unstable/tools/examples/network.orig    2005-01-24 10:57:45.000000000 
-0500
+++ xen-unstable/tools/examples/network 2005-01-24 13:24:31.000000000 -0500
@@ -61,13 +61,13 @@
     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}/


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] make network script not break with ipv6, Rik van Riel <=