[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix vif-net script for setups where eth0 has no IP address.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID ccb923727f93e8228e5693f8f3470c0d0fc45851
# Parent  7bf19284bf3f338f36680558f74153c73bb3b4d6
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@xxxxxxxxxxxx>

diff -r 7bf19284bf3f -r ccb923727f93 tools/examples/vif-nat
--- a/tools/examples/vif-nat    Fri Dec  2 18:26:58 2005
+++ b/tools/examples/vif-nat    Fri Dec  2 21:15:58 2005
@@ -91,8 +91,6 @@
 netmask=$(dotted_quad $intmask)
 network=$(dotted_quad $(( $vif_int & $intmask )) )
 
-main_ip=$(dom0_ip)
-
 
 dhcp_remove_entry()
 {
@@ -140,7 +138,7 @@
 
         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
         ;;

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.