From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guillaume Rousse Subject: Re: [PATCH] bug in default interface number computation Date: Mon, 18 Dec 2006 13:13:02 +0100 Message-ID: <458685CE.6050500@inria.fr> References: <4586679B.40007@inria.fr> <20061218114816.GC22626@leeni.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080308080808060305090703" Return-path: In-Reply-To: <20061218114816.GC22626@leeni.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------080308080808060305090703 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Ewan Mellor wrote: > On Mon, Dec 18, 2006 at 11:04:11AM +0100, Guillaume Rousse wrote: > >> As previously explained, the network-bridge script tries to >> automatically find the default network interface number with the >> following ligne: >> vifnum=${vifnum:-$(ip route list | awk '/^default / { print $NF }' | sed >> 's/^[^0-9]*//')} >> >> However, this fails on mandriva, because the parsed line is: >> default via 193.55.250.126 dev eth0 metric 10 >> >> Attached patch fix this issue. >> >> BTW, that's the second time I'm sending it, I've had no answer sofar. If >> this is not the recommanded way to declare problems and send correction >> patches, just tell me. > > Sorry about missing it the first time. Your patch looks fine to me -- if you > could just resend it with a Signed-off-by line, I'll put it in. If I understand correctly, I just have to add this line, right ? Signed-off-by: Guillaume Rousse --------------080308080808060305090703 Content-Type: text/x-patch; name="xen-3.0.3.fix_network_bridge.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xen-3.0.3.fix_network_bridge.patch" diff -Naur xen-3.0.3_0-src/tools/examples/network-bridge xen-3.0.3_0-src.fix_network_bridge/tools/examples/network-bridge --- xen-3.0.3_0-src/tools/examples/network-bridge 2006-10-15 14:22:03.000000000 +0200 +++ xen-3.0.3_0-src.fix_network_bridge/tools/examples/network-bridge 2006-12-18 10:58:38.000000000 +0100 @@ -59,7 +59,7 @@ findCommand "$@" evalVariables "$@" -vifnum=${vifnum:-$(ip route list | awk '/^default / { print $NF }' | sed 's/^[^0-9]*//')} ++vifnum=${vifnum:-$(ip route list 0.0.0.0/0 | sed 's/.*dev[^0-9]\+\([0-9]\+\).*$/\1/')} vifnum=${vifnum:-0} bridge=${bridge:-xenbr${vifnum}} netdev=${netdev:-eth${vifnum}} --------------080308080808060305090703 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------080308080808060305090703--