ia64/xen-unstable

changeset 16350:d4c5a1cdcf2e

network-bridge: Make detection of gateway device more robust.
Signed-off-by: Guillaume Rousse <Guillaume.Rousse@inria.fr>
author Keir Fraser <keir@xensource.com>
date Wed Nov 07 16:55:13 2007 +0000 (2007-11-07)
parents 4f1363491a77
children a1247c2df2b4 5b8730c78454
files tools/examples/network-bridge
line diff
     1.1 --- a/tools/examples/network-bridge	Wed Nov 07 16:51:08 2007 +0000
     1.2 +++ b/tools/examples/network-bridge	Wed Nov 07 16:55:13 2007 +0000
     1.3 @@ -72,8 +72,8 @@ find_alt_device () {
     1.4      echo "$ifs"
     1.5  }
     1.6  
     1.7 -netdev=${netdev:-$(ip route list | awk '/^default / { print $NF }' |
     1.8 -		   sed 's/.* dev //')}
     1.9 +netdev=${netdev:-$(ip route list 0.0.0.0/0  | \
    1.10 +                   sed 's/.*dev \([a-z]\+[0-9]\+\).*$/\1/')}
    1.11  if is_network_root ; then
    1.12      altdevs=$(find_alt_device $netdev)
    1.13      for netdev in $altdevs; do break; done