PATCH for server/dhcp.c

Brian T btuchten at jbmelectronics.com
Tue Mar 21 18:07:27 UTC 2006


Hi,
I'm using isc-dhcpd-V3.0.3 on an embedded Linux disro, and I noticed that if a Windows XP PC ( for example ) has an IP address 192.168.0.254/255.255.255.0, and then the dhcpd server is restarted with a new config and a different range like 10.10.10.0/24; when telling the PC to renew, the Linux syslog gets this :

Dec 31 19:40:19 dhcpd: DHCPREQUEST for 192.168.0.254 from 00:03:25:21:ba:ba via eth1: unknown lease 192.168.0.254.
Dec 31 19:40:20 dhcpd: DHCPREQUEST for 192.168.0.254 from 00:03:25:21:ba:ba via eth1: unknown lease 192.168.0.254.
Dec 31 19:40:21 dhcpd: DHCPREQUEST for 192.168.0.254 from 00:03:25:21:ba:ba via eth1: unknown lease 192.168.0.254.

So, I added an entry for nak_lease() and it seemed to fixe the problem.  Is there a reason why this shouldn't be added?  

Thanks,

-Brian


--- dhcp.c.orig 2006-03-21 11:24:43.000000000 -0600
+++ dhcp.c      2006-03-20 17:18:52.000000000 -0600
@@ -667,8 +667,10 @@
        if (lease) {
                ack_lease (packet, lease, DHCPACK, 0, msgbuf, ms_nulltp,
                           (struct host_decl *)0);
-       } else 
+       } else {
                log_info ("%s: unknown lease %s.", msgbuf, piaddr (cip));
+               nak_lease (packet, &cip);
+       }
 
       out:
        if (subnet)






More information about the dhcp-hackers mailing list