mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-05 00:00:45 -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);
|
||||
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 */
|
||||
if (pool->size == 0)
|
||||
{
|
||||
@ -216,6 +209,13 @@ static host_t* acquire_address(private_stroke_attribute_t *this,
|
||||
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 */
|
||||
offset = (uintptr_t)pool->offline->remove(pool->offline, id);
|
||||
if (offset)
|
||||
@ -272,7 +272,7 @@ static host_t* acquire_address(private_stroke_attribute_t *this,
|
||||
}
|
||||
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;
|
||||
}
|
||||
this->mutex->unlock(this->mutex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user