pre-creating reserved leases

Foggi, Nicola NFOGGI at depaul.edu
Wed Mar 4 02:58:49 UTC 2009


So trying to follow what happens when a dhcpdiscover comes in this is what i've found, maybe i'm completely off, but maybe not..

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.

This is the code from dhcp.c that I'm focusing on (line 301 of 3.1.2b1):

#if defined (FAILOVER_PROTOCOL)
        if (lease && lease -> pool && lease -> pool -> failover_peer) {
                peer = lease -> pool -> failover_peer;

                /* If the lease is ours to allocate, then allocate it.
                 * If the lease is active, it belongs to the client.  This
                 * is the right lease, if we are to offer one.  We decide
                 * wether or not to offer later on.
                 */
                if (lease->binding_state == FTS_ACTIVE ||
                    lease_mine_to_reallocate(lease)) {
                        ; /* This space intentionally left blank. */

Still going to continue digging deeper, but wouldn't we need to check the lease flag at this point as an option to match if it's reserved to determine if the lease is the right lease?  At this point would a "lease->flags & RESERVED_LEASE" be a valid match as part of the if statement?

Thoughts?

Nicola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3233 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090303/9320cfe7/attachment.bin>


More information about the dhcp-users mailing list