From: Eric Price Date: Mon, 29 Oct 2007 05:20:29 +0000 (-0400) Subject: DHCP hostname change. X-Git-Tag: sipb-xen-dhcp/1~7 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dhcp.git/commitdiff_plain/725331f31907f24e96b6c3d1c699a404f6db7bff DHCP hostname change. svn path=/trunk/dhcp/; revision=230 --- diff --git a/dhcpserver.py b/dhcpserver.py index 6171843..8f4a129 100644 --- a/dhcpserver.py +++ b/dhcpserver.py @@ -104,12 +104,12 @@ class DhcpBackend: Log.Output(Log.debug,"dhcp_backend : Discover ") chaddr = hwmac(packet.GetHardwareAddress()) nic = self.findNIC(str(chaddr)) - if nic is None: + if nic is None or nic.machine is None: return False ip = nic.ip if ip is None: #Deactivated? return False - hostname = nic.hostname + hostname = nic.machine.name if hostname is not None: hostname += ".servers.csail.mit.edu" if ip is not None: