<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>RE: Bug with Failover and Reserved Leases (bugid #18226)</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>

<P><FONT SIZE=2>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)<BR>
<BR>
Nicola<BR>
<BR>
1055,1058c1055,1061<BR>
<             case FTS_FREE:<BR>
<               lq = &comp -> pool -> free;<BR>
<               if (!(comp->flags & RESERVED_LEASE))<BR>
<                       comp->pool->free_leases--;<BR>
---<BR>
>               case FTS_FREE:<BR>
>                 if (comp->flags & RESERVED_LEASE) {<BR>
>                         lq = &comp->pool->reserved;<BR>
>                 } else {<BR>
>                         lq = &comp->pool->free;<BR>
>                         comp->pool->free_leases++;<BR>
>                 }<BR>
1079,1082c1082,1088<BR>
<             case FTS_BACKUP:<BR>
<               lq = &comp -> pool -> backup;<BR>
<               if (!(comp->flags & RESERVED_LEASE))<BR>
<                       comp->pool->backup_leases--;<BR>
---<BR>
>               case FTS_BACKUP:<BR>
>                 if (comp->flags & RESERVED_LEASE) {<BR>
>                         lq = &comp->pool->reserved;<BR>
>                 } else {<BR>
>                         lq = &comp->pool->backup;<BR>
>                         comp->pool->backup_leases++;<BR>
>                 }<BR>
<BR>
-----Original Message-----<BR>
From: dhcp-users-bounce@isc.org on behalf of Foggi, Nicola<BR>
Sent: Mon 8/25/2008 9:25 AM<BR>
To: dhcp-users@isc.org<BR>
Subject: Bug with Failover and Reserved Leases (bugid #18226)<BR>
<BR>
<BR>
Hey Everyone,<BR>
<BR>
So I have sent an email about the messages:<BR>
<BR>
"Lease with binding state free not on its queue"<BR>
"Lease with binding state backup not on its queue"<BR>
<BR>
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:<BR>
<BR>
        if (!lp) {<BR>
                log_fatal("Lease with binding state %s not on its queue.",<BR>
                          (comp->binding_state < 1 ||<BR>
                           comp->binding_state > FTS_LAST)<BR>
                          ? "unknown"<BR>
                          : binding_state_names[comp->binding_state - 1]);<BR>
        }<BR>
<BR>
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:<BR>
<BR>
<A HREF="http://marc.info/?l=dhcp-users&m=118900960511482&w=2">http://marc.info/?l=dhcp-users&m=118900960511482&w=2</A><BR>
<BR>
We're trying to track down what's actually going on at that point in the code, so any help would be great!<BR>
<BR>
Nicola Foggi<BR>
Networks and Telecom<BR>
DePaul University<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>