Abandoning abandoned leases??
John Hascall
john at iastate.edu
Thu Sep 11 12:37:39 UTC 2008
Well, I guess I'll answer my own question.
In abandon_lease() in the file server/mdb.c we find the artfully
commented line:
lt -> ends = cur_time; /* XXX */
which means that when dhcpd reads this lease when it restarts
it is guaranteed to be time for a state change so it goes
from binding_state ABANDONED to next_binding_state FREE.
As a quick test I added:
lt -> ends += 86400;
and sure enough, my abandoned leases are still there though
(so far) 22.5 hours worth of restarts.
John
> Everytime our dhcpd server restarts (and owing to "NetReg"
> that is quite often) it seems to forget about all the
> addresses which were abandoned. This has become a
> major problem.
>
> If I stash a copy of the lease file immediately before
> and after restarting dhcpd and do a diff on those files
> I see all the abandoned leases in the before but not
> the after file.
>
> Is this a "feature"? Or has something gone wrong?
>
> We are running Internet Systems Consortium DHCP Server V3.1.0
>
> Thanks,
> John
>
More information about the dhcp-users
mailing list