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

[Xen-changelog] XendDomainInfo.py:



ChangeSet 1.1614, 2005/05/31 16:20:00+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        XendDomainInfo.py:
          g/c vif_up: it's the guest's responsibility to take appropriate
          actions to get its network working again, i.e. send ARP packets when
          it's resumed.
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 XendDomainInfo.py |   33 ---------------------------------
 1 files changed, 33 deletions(-)


diff -Nru a/tools/python/xen/xend/XendDomainInfo.py 
b/tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   2005-05-31 12:03:50 -04:00
+++ b/tools/python/xen/xend/XendDomainInfo.py   2005-05-31 12:03:50 -04:00
@@ -93,38 +93,6 @@
     """
     return shutdown_reasons.get(code, "?")
 
-def vif_up(iplist):
-    """send an unsolicited ARP reply for all non link-local IP addresses.
-
-    @param iplist: IP addresses
-    """
-
-    IP_NONLOCAL_BIND = '/proc/sys/net/ipv4/ip_nonlocal_bind'
-    
-    def get_ip_nonlocal_bind():
-        return int(open(IP_NONLOCAL_BIND, 'r').read()[0])
-
-    def set_ip_nonlocal_bind(v):
-        print >> open(IP_NONLOCAL_BIND, 'w'), str(v)
-
-    def link_local(ip):
-        return xen.util.ip.check_subnet(ip, '169.254.0.0', '255.255.0.0')
-
-    def arping(ip, gw):
-        cmd = '/usr/sbin/arping -A -b -I eth0 -c 1 -s %s %s' % (ip, gw)
-        log.debug(cmd)
-        os.system(cmd)
-        
-    gateway = xen.util.ip.get_current_ipgw() or '255.255.255.255'
-    nlb = get_ip_nonlocal_bind()
-    if not nlb: set_ip_nonlocal_bind(1)
-    try:
-        for ip in iplist:
-            if not link_local(ip):
-                arping(ip, gateway)
-    finally:
-        if not nlb: set_ip_nonlocal_bind(0)
-
 config_handlers = {}
 
 def add_config_handler(name, h):
@@ -244,7 +212,6 @@
     except Exception, ex:
         raise VmError('config error: ' + str(ex))
     vm.dom_construct(dom, config)
-    vif_up(vm.ipaddrs)
     return vm
     
 def dom_get(dom):

_______________________________________________
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®.