X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dhcp.git/blobdiff_plain/725331f31907f24e96b6c3d1c699a404f6db7bff..5b5216809d7e7d0e78df31d274c2e97eb77be2c2:/dhcpserver.py diff --git a/dhcpserver.py b/dhcpserver.py index 8f4a129..3133643 100644 --- a/dhcpserver.py +++ b/dhcpserver.py @@ -109,9 +109,12 @@ class DhcpBackend: ip = nic.ip if ip is None: #Deactivated? return False - hostname = nic.machine.name - if hostname is not None: - hostname += ".servers.csail.mit.edu" + if nic.hostname and '.' in nic.hostname: + hostname = nic.hostname + elif nic.machine.name: + hostname = nic.machine.name + '.servers.csail.mit.edu' + else: + hostname = None if ip is not None: ip = ipv4(ip) Log.Output(Log.debug,"dhcp_backend : Discover result = "+str(ip))