pre-creating reserved leases

David W. Hankins David_Hankins at isc.org
Wed Mar 4 17:47:10 UTC 2009


On Tue, Mar 03, 2009 at 08:58:49PM -0600, Foggi, Nicola wrote:
> dhcpdiscover comes in and executes find_lease, log message written, if failover is defined (is in my case) it checks the lease to determine if it's the right one to allocate where the binding state must be "FTS_ACTIVE" or lease_mine_to_reallocate passes.  So here might be the problem, the lease is in a "FREE" binding state.

Then this must be the primary.  Reserved leases act a little
different.  A primary should record it as free, the secondary should
record it as backup, when they process the bndupd or bndack from the
peer with the reserved flag set.

So lease_mine_to_reallocate() should succeed on an inactive lease, no
matter primary or secondary, so it sounds like you're looking at a bug
either inside that function, or earlier in processing where the
lease's state is set.

There are some other corner cases I'm wondering about now; if the
secondary believed the lease was 'expired' or 'released' at that
particular instant, it wouldn't think the lease was available for
allocation.  Probably we do want to check the reserved flag in the
find_lease() function.

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090304/e58322af/attachment.bin>


More information about the dhcp-users mailing list