From 725331f31907f24e96b6c3d1c699a404f6db7bff Mon Sep 17 00:00:00 2001 From: Eric Price Date: Mon, 29 Oct 2007 01:20:29 -0400 Subject: [PATCH] DHCP hostname change. svn path=/trunk/dhcp/; revision=230 --- dhcpserver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- 1.7.9.5