From aa3e348e8bd40efa8e2aa34c26b7739bc20137a6 Mon Sep 17 00:00:00 2001 From: David Hankins Date: Mon, 1 Oct 2007 15:12:19 +0000 Subject: [PATCH] - An assertion in lease counting relating to reserved leases was repaired. [ISC-Bugs #17130] --- RELNOTES | 2 ++ server/mdb.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/RELNOTES b/RELNOTES index 8464f453..41557bdf 100644 --- a/RELNOTES +++ b/RELNOTES @@ -223,6 +223,8 @@ suggested fixes to . 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 diff --git a/server/mdb.c b/server/mdb.c index f18dc8d6..2c3b1053 100644 --- a/server/mdb.c +++ b/server/mdb.c @@ -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;