From: Martin Willi Date: Tue, 27 Jul 2010 07:54:27 +0000 (+0200) Subject: Mem pool does not support multiple leases for an identity X-Git-Tag: 4.4.1~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=45c992474cd4c204b77eaef9c5b38cc199cf8f31;p=thirdparty%2Fstrongswan.git Mem pool does not support multiple leases for an identity --- diff --git a/src/libhydra/attributes/mem_pool.c b/src/libhydra/attributes/mem_pool.c index 65018e3a95..e1d69fd6b5 100644 --- a/src/libhydra/attributes/mem_pool.c +++ b/src/libhydra/attributes/mem_pool.c @@ -225,9 +225,18 @@ METHOD(mem_pool_t, acquire_address, host_t*, /* check for a valid online lease, reassign */ offset = (uintptr_t)this->online->get(this->online, id); - if (offset && offset == host2offset(this, requested)) + if (offset) { - DBG1(DBG_CFG, "reassigning online lease to '%Y'", id); + if (offset == host2offset(this, requested)) + { + DBG1(DBG_CFG, "reassigning online lease to '%Y'", id); + } + else + { + DBG1(DBG_CFG, "'%Y' already has an online lease, " + "unable to assign address", id); + offset = 0; + } break; }