All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bug in default interface number computation
@ 2006-12-18 10:04 Guillaume Rousse
  2006-12-18 11:48 ` Ewan Mellor
  0 siblings, 1 reply; 3+ messages in thread
From: Guillaume Rousse @ 2006-12-18 10:04 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 543 bytes --]

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.

[-- Attachment #2: xen-3.0.3.fix_network_bridge.patch --]
[-- Type: text/x-patch, Size: 638 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-12-18 12:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-18 10:04 [PATCH] bug in default interface number computation Guillaume Rousse
2006-12-18 11:48 ` Ewan Mellor
2006-12-18 12:13   ` Guillaume Rousse

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.