respect family when assigning pool addresses
This commit is contained in:
@@ -202,6 +202,13 @@ static host_t* acquire_address(private_stroke_attribute_t *this,
|
|||||||
pool = find_pool(this, name);
|
pool = find_pool(this, name);
|
||||||
while (pool)
|
while (pool)
|
||||||
{
|
{
|
||||||
|
if (requested->get_family(requested) !=
|
||||||
|
pool->base->get_family(pool->base))
|
||||||
|
{
|
||||||
|
DBG1(DBG_CFG, "IP pool address family mismatch");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* handle %config case by mirroring requested address */
|
/* handle %config case by mirroring requested address */
|
||||||
if (pool->size == 0)
|
if (pool->size == 0)
|
||||||
{
|
{
|
||||||
@@ -298,7 +305,7 @@ static bool release_address(private_stroke_attribute_t *this,
|
|||||||
id = pool->ids->get(pool->ids, id);
|
id = pool->ids->get(pool->ids, id);
|
||||||
if (id)
|
if (id)
|
||||||
{
|
{
|
||||||
DBG1(DBG_CFG, "lease %H to %D went offline", address, id);
|
DBG1(DBG_CFG, "lease %H of %D is gone offline", address, id);
|
||||||
pool->offline->put(pool->offline, id, (void*)offset);
|
pool->offline->put(pool->offline, id, (void*)offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user