summaryrefslogtreecommitdiff
path: root/src/libhydra/attributes/mem_pool.c
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2010-08-09 09:43:35 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2010-08-09 09:43:35 +0000
commit9e7fb8577802de2abf191d783be5b6b953c22271 (patch)
treee6818532d3a85a8a840652f6dfc0d58d42c89a69 /src/libhydra/attributes/mem_pool.c
parent20e652eab94f898365fdde046ed11a2dda2f165e (diff)
downloadvyos-strongswan-9e7fb8577802de2abf191d783be5b6b953c22271.tar.gz
vyos-strongswan-9e7fb8577802de2abf191d783be5b6b953c22271.zip
New upstream release.
Diffstat (limited to 'src/libhydra/attributes/mem_pool.c')
-rw-r--r--src/libhydra/attributes/mem_pool.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/libhydra/attributes/mem_pool.c b/src/libhydra/attributes/mem_pool.c
index 65018e3a9..e1d69fd6b 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;
}