Bug with Failover and Reserved Leases (bugid #18226)

Foggi, Nicola NFOGGI at depaul.edu
Mon Aug 25 15:04:33 UTC 2008


and now a follow up to my own post, I think this would fix it in mdb.c, can any of the isc folks confirm that this is kosher, if so, would it be possible to get it committed to the source for the next releases?  (I found the correct case statement used later in the code, it looks like maybe this was just missed)

Nicola

1055,1058c1055,1061
<             case FTS_FREE:
<               lq = &comp -> pool -> free;
<               if (!(comp->flags & RESERVED_LEASE))
<                       comp->pool->free_leases--;
---
>               case FTS_FREE:
>                 if (comp->flags & RESERVED_LEASE) {
>                         lq = &comp->pool->reserved;
>                 } else {
>                         lq = &comp->pool->free;
>                         comp->pool->free_leases++;
>                 }
1079,1082c1082,1088
<             case FTS_BACKUP:
<               lq = &comp -> pool -> backup;
<               if (!(comp->flags & RESERVED_LEASE))
<                       comp->pool->backup_leases--;
---
>               case FTS_BACKUP:
>                 if (comp->flags & RESERVED_LEASE) {
>                         lq = &comp->pool->reserved;
>                 } else {
>                         lq = &comp->pool->backup;
>                         comp->pool->backup_leases++;
>                 }

-----Original Message-----
From: dhcp-users-bounce at isc.org on behalf of Foggi, Nicola
Sent: Mon 8/25/2008 9:25 AM
To: dhcp-users at isc.org
Subject: Bug with Failover and Reserved Leases (bugid #18226)
 

Hey Everyone,

So I have sent an email about the messages:

"Lease with binding state free not on its queue"
"Lease with binding state backup not on its queue"

and submitted a bug to try and track down the problem, but didn't hear back.  I'm having someone who knows more 'c' then I do go through, and we think it's in this if statement in mdb.c:

        if (!lp) {
                log_fatal("Lease with binding state %s not on its queue.",
                          (comp->binding_state < 1 ||
                           comp->binding_state > FTS_LAST)
                          ? "unknown"
                          : binding_state_names[comp->binding_state - 1]);
        }

under "int supersede_lease"... the problem occurs when a lease has a state of FREE or BACKUP and also has the RESERVED flag set.  I found mention of a previous possible bug around the same type of problem here:

http://marc.info/?l=dhcp-users&m=118900960511482&w=2

We're trying to track down what's actually going on at that point in the code, so any help would be great!

Nicola Foggi
Networks and Telecom
DePaul University

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20080825/6f1cb9f5/attachment.html>


More information about the dhcp-users mailing list