mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-07 00:01:49 -04:00
[4859] caused crash when handling the %config case
This commit is contained in:
parent
392f0e9446
commit
6f1271855b
@ -202,13 +202,6 @@ 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)
|
||||||
{
|
{
|
||||||
@ -216,6 +209,13 @@ static host_t* acquire_address(private_stroke_attribute_t *this,
|
|||||||
return requested->clone(requested);
|
return requested->clone(requested);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (requested->get_family(requested) !=
|
||||||
|
pool->base->get_family(pool->base))
|
||||||
|
{
|
||||||
|
DBG1(DBG_CFG, "IP pool address family mismatch");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* check for a valid offline lease, refresh */
|
/* check for a valid offline lease, refresh */
|
||||||
offset = (uintptr_t)pool->offline->remove(pool->offline, id);
|
offset = (uintptr_t)pool->offline->remove(pool->offline, id);
|
||||||
if (offset)
|
if (offset)
|
||||||
@ -272,7 +272,7 @@ static host_t* acquire_address(private_stroke_attribute_t *this,
|
|||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
|
|
||||||
DBG1(DBG_CFG, "pool '%s' is full, unable to assign address", pool->name);
|
DBG1(DBG_CFG, "pool '%s' is full, unable to assign address", name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this->mutex->unlock(this->mutex);
|
this->mutex->unlock(this->mutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user