ia64/xen-unstable

changeset 8202:ccb923727f93

Fix vif-net script for setups where eth0 has no IP address.
Use the IP address associated with the backend network interface
for connections from dom0 to the guest connected to this network
interface.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Fri Dec 02 22:15:58 2005 +0100 (2005-12-02)
parents 7bf19284bf3f
children 114946d9937f
files tools/examples/vif-nat
line diff
     1.1 --- a/tools/examples/vif-nat	Fri Dec 02 19:26:58 2005 +0100
     1.2 +++ b/tools/examples/vif-nat	Fri Dec 02 22:15:58 2005 +0100
     1.3 @@ -91,8 +91,6 @@ vif_int=$(( $(echo "((($vif_ip" | sed -e
     1.4  netmask=$(dotted_quad $intmask)
     1.5  network=$(dotted_quad $(( $vif_int & $intmask )) )
     1.6  
     1.7 -main_ip=$(dom0_ip)
     1.8 -
     1.9  
    1.10  dhcp_remove_entry()
    1.11  {
    1.12 @@ -140,7 +138,7 @@ case "$command" in
    1.13  
    1.14          do_or_die ip link set "$vif" up arp on
    1.15          do_or_die ip addr add "$router_ip" dev "$vif"
    1.16 -        do_or_die ip route add "$vif_ip" dev "$vif" src "$main_ip"
    1.17 +        do_or_die ip route add "$vif_ip" dev "$vif" src "$router_ip"
    1.18          echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
    1.19          [ "$dhcp" != 'no' ] && dhcp_up
    1.20          ;;