Adaptive lease time patch
David W. Hankins
David_Hankins at isc.org
Mon Sep 12 21:28:23 UTC 2005
lease->ends might be less than cur_time - particularly when a lease is
freshly allocated, which will certainly wind up in a value greater than
min lease time.
It should probably also be bounded by the lease time that had been
determined upon entering this conditional - the default or the
client supplied. Although the lease may be extended beyond
these points, the default might have changed, or the client might
know better about how long it plans to be up (unlikely as that is).
So, the result of this statement shouldn't increase the lease time.
If the result is lowered underneath min lease time, don't sweat it...
the very next conditional after your new code will test and fix this.
On Mon, Sep 12, 2005 at 10:46:27PM +0200, Christof Chen wrote:
> Ok, here is the new patch with your idea and the correction from Ted. Would
> there be any chance for inclusion of this patch into the mainline?
> ,,,patches to dhcpd.conf.5 would be supplied too :)
It's within a configuration option, I don't see why not.
I'd prefer to see the configuration option be a percentage, or a
fixed limit (like "10 leases"). A lot of pools normally run at
80-90% utilized.
But beggars can't be choosers.
--
David W. Hankins "If you don't do it right the first time,
Software Engineer you'll just have to do it again."
Internet Systems Consortium, Inc. -- Jack T. Hankins
More information about the dhcp-hackers
mailing list