dhcpd 3.1.2b1 failover with reserved flags

David W. Hankins dhankins at isc.org
Tue Nov 17 00:15:20 UTC 2009


On Mon, Nov 16, 2009 at 10:29:04AM -0600, Foggi, Nicola wrote:
> --- failover.c.orig     2008-09-24 11:20:26.000000000 -0500
> +++ failover.c  2009-03-26 16:52:46.000000000 -0500
> @@ -6068,6 +6068,18 @@
>                         if (peer -> i_am == primary)
>                                 return 1;
>  
> +                       if (lease->flags & RESERVED_LEASE)
> +                               return 1;
> +
> +                        /* If lease is RESERVED allow secondary to allocate
> +                         * lease
> +                         */
> +
> +                        if ((peer -> i_am == secondary) &&
> +                             (lease->flags & RESERVED_LEASE)) {
> +                                return 1;
> +                        }

These two conditionals you've added overlap.  Unless there is a bug
elsewhere, neither should be necessary; reserved and bootp leases are
set to the local system's free state when they are expired.

So this code should never be exercised.

-- 
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: 194 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20091116/f1941d01/attachment.bin>


More information about the dhcp-users mailing list