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-changelog

[Xen-changelog] [xen-3.0-testing] Fix code which finds the default inter

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.0-testing] Fix code which finds the default interface if there are static routes.
From: Xen patchbot-3.0-testing <patchbot-3.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 11 Jun 2006 21:55:46 +0000
Delivery-date: Sun, 11 Jun 2006 14:57:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 669a737174af5e82d589a584e6f4f904a09aa09c
# Parent  5461e2e86e989375b707f25bf93d3d4074b80920
Fix code which finds the default interface if there are static routes.
The current code will break if there are multiple scope global routes
since the "ip route list default" command doesn't use "default" as a
filter, and will output multiple devices which breaks the rest of the
script.
Also make the vif/xenbr/eth naming consistent, i.e. if your default
network interface is eth1, you get vif1 and xenbr1.

Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
---
 tools/examples/network-bridge |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -r 5461e2e86e98 -r 669a737174af tools/examples/network-bridge
--- a/tools/examples/network-bridge     Sun Jun 11 19:28:57 2006 +0100
+++ b/tools/examples/network-bridge     Sun Jun 11 20:34:23 2006 +0100
@@ -59,9 +59,8 @@ findCommand "$@"
 findCommand "$@"
 evalVariables "$@"
 
-vifnum=${vifnum:-0}
+vifnum=${vifnum:-$(ip route list | awk '/^default / { sub(/eth/,"",$NF); print 
$NF }')}
 bridge=${bridge:-xenbr${vifnum}}
-netdev=${netdev:-$(ip route list default scope global| awk '{ print $NF }')}
 netdev=${netdev:-eth${vifnum}}
 antispoof=${antispoof:-no}
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.0-testing] Fix code which finds the default interface if there are static routes., Xen patchbot-3 . 0-testing <=