]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Mem pool does not support multiple leases for an identity
authorMartin Willi <martin@revosec.ch>
Tue, 27 Jul 2010 07:54:27 +0000 (09:54 +0200)
committerMartin Willi <martin@revosec.ch>
Tue, 27 Jul 2010 07:54:27 +0000 (09:54 +0200)
src/libhydra/attributes/mem_pool.c

index 65018e3a95c099eef0e75dafab7ba7dfa995a836..e1d69fd6b5bad3ac3950d0216d4610e50a7ee695 100644 (file)
@@ -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;
                }