]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- An assertion in lease counting relating to reserved leases was repaired.
authorDavid Hankins <dhankins@isc.org>
Mon, 1 Oct 2007 15:12:19 +0000 (15:12 +0000)
committerDavid Hankins <dhankins@isc.org>
Mon, 1 Oct 2007 15:12:19 +0000 (15:12 +0000)
  [ISC-Bugs #17130]

RELNOTES
server/mdb.c

index 8464f4535d855f9bc1c79df280d07f4a802930d4..41557bdfbceede5f4afa054b09dd19fcb0b95171 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -223,6 +223,8 @@ suggested fixes to <dhcp-users@isc.org>.
   identifier was sometimes mishashed to the peer.  Load balancing during
   runtime and pool rebalancing were opposing.
 
+- An assertion in lease counting relating to reserved leases was repaired.
+
                        Changes since 3.1.0rc1
 
 - The parse warning that 'deny dyanmic bootp;' must be configured for
index f18dc8d623173cb9c2203a16fc81ca3f3db1f4e6..2c3b1053c5d92a80f74aa27347ae47b2d34e71d5 100644 (file)
@@ -2515,13 +2515,13 @@ void expire_all_pools ()
                                if (l->binding_state == FTS_FREE) {
                                        if (i == FREE_LEASES)
                                                p->free_leases++;
-                                       else
+                                       else if (i != RESERVED_LEASES)
                                                log_fatal("Impossible case "
                                                          "at %s:%d.", MDL);
                                } else if (l->binding_state == FTS_BACKUP) {
                                        if (i == BACKUP_LEASES)
                                                p->backup_leases++;
-                                       else
+                                       else if (i != RESERVED_LEASES)
                                                log_fatal("Impossible case "
                                                          "at %s:%d.", MDL);
                                }
@@ -2759,7 +2759,7 @@ void free_everything ()
                    pool_reference (&pn, nc -> pools, MDL);
                    do {
                        struct lease **lptr[RESERVED_LEASES+1];
-                       
+
                        if (pn) {
                            pool_reference (&pc, pn, MDL);
                            pool_dereference (&pn, MDL);
@@ -2768,7 +2768,7 @@ void free_everything ()
                            pool_reference (&pn, pc -> next, MDL);
                            pool_dereference (&pc -> next, MDL);
                        }
-                       
+
                        lptr [FREE_LEASES] = &pc -> free;
                        lptr [ACTIVE_LEASES] = &pc -> active;
                        lptr [EXPIRED_LEASES] = &pc -> expired;