ia64/xen-unstable

changeset 5234:abe0fd18962c

bitkeeper revision 1.1614 (429c80a0GOB6P2mG94bxVMLZE34VdA)

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@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue May 31 15:20:00 2005 +0000 (2005-05-31)
parents c14443dad5a0
children 1af7f0708b54
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue May 31 14:01:02 2005 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue May 31 15:20:00 2005 +0000
     1.3 @@ -93,38 +93,6 @@ def shutdown_reason(code):
     1.4      """
     1.5      return shutdown_reasons.get(code, "?")
     1.6  
     1.7 -def vif_up(iplist):
     1.8 -    """send an unsolicited ARP reply for all non link-local IP addresses.
     1.9 -
    1.10 -    @param iplist: IP addresses
    1.11 -    """
    1.12 -
    1.13 -    IP_NONLOCAL_BIND = '/proc/sys/net/ipv4/ip_nonlocal_bind'
    1.14 -    
    1.15 -    def get_ip_nonlocal_bind():
    1.16 -        return int(open(IP_NONLOCAL_BIND, 'r').read()[0])
    1.17 -
    1.18 -    def set_ip_nonlocal_bind(v):
    1.19 -        print >> open(IP_NONLOCAL_BIND, 'w'), str(v)
    1.20 -
    1.21 -    def link_local(ip):
    1.22 -        return xen.util.ip.check_subnet(ip, '169.254.0.0', '255.255.0.0')
    1.23 -
    1.24 -    def arping(ip, gw):
    1.25 -        cmd = '/usr/sbin/arping -A -b -I eth0 -c 1 -s %s %s' % (ip, gw)
    1.26 -        log.debug(cmd)
    1.27 -        os.system(cmd)
    1.28 -        
    1.29 -    gateway = xen.util.ip.get_current_ipgw() or '255.255.255.255'
    1.30 -    nlb = get_ip_nonlocal_bind()
    1.31 -    if not nlb: set_ip_nonlocal_bind(1)
    1.32 -    try:
    1.33 -        for ip in iplist:
    1.34 -            if not link_local(ip):
    1.35 -                arping(ip, gateway)
    1.36 -    finally:
    1.37 -        if not nlb: set_ip_nonlocal_bind(0)
    1.38 -
    1.39  config_handlers = {}
    1.40  
    1.41  def add_config_handler(name, h):
    1.42 @@ -244,7 +212,6 @@ def vm_restore(src, progress=False):
    1.43      except Exception, ex:
    1.44          raise VmError('config error: ' + str(ex))
    1.45      vm.dom_construct(dom, config)
    1.46 -    vif_up(vm.ipaddrs)
    1.47      return vm
    1.48      
    1.49  def dom_get(dom):