aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-12-02 22:15:58 +0100
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-12-02 22:15:58 +0100
commitcb6bdaa39f01eaf73e70aa403934027a979feb09 (patch)
tree74aa843161fe9d46363bfee54cc396c846088c8c
parenta3acca698f7ef4ae2e4674a9e1b5b5a2ff7191a6 (diff)
downloadxen-cb6bdaa39f01eaf73e70aa403934027a979feb09.tar.gz
xen-cb6bdaa39f01eaf73e70aa403934027a979feb09.tar.bz2
xen-cb6bdaa39f01eaf73e70aa403934027a979feb09.zip
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>
-rw-r--r--tools/examples/vif-nat4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/examples/vif-nat b/tools/examples/vif-nat
index b2bfade528..d667fb89da 100644
--- a/tools/examples/vif-nat
+++ b/tools/examples/vif-nat
@@ -91,8 +91,6 @@ vif_int=$(( $(echo "((($vif_ip" | sed -e 's#\.#)\*256\+#g') ))
netmask=$(dotted_quad $intmask)
network=$(dotted_quad $(( $vif_int & $intmask )) )
-main_ip=$(dom0_ip)
-
dhcp_remove_entry()
{
@@ -140,7 +138,7 @@ case "$command" in
do_or_die ip link set "$vif" up arp on
do_or_die ip addr add "$router_ip" dev "$vif"
- do_or_die ip route add "$vif_ip" dev "$vif" src "$main_ip"
+ do_or_die ip route add "$vif_ip" dev "$vif" src "$router_ip"
echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
[ "$dhcp" != 'no' ] && dhcp_up
;;