diff options
| author | Andreas Steffen <andreas.steffen@strongswan.org> | 2009-02-11 22:39:35 +0000 |
|---|---|---|
| committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2009-02-11 22:39:35 +0000 |
| commit | 6f1271855bfdbeb7357b02fbb6759efc71cfbbc9 (patch) | |
| tree | 9815441def32eaf5a0ecb688ebef887ea6445c8b /src/charon/plugins/stroke/stroke_attribute.c | |
| parent | 392f0e9446d86a16872b17d7aeb6c4ece214dc53 (diff) | |
| download | strongswan-6f1271855bfdbeb7357b02fbb6759efc71cfbbc9.tar.bz2 strongswan-6f1271855bfdbeb7357b02fbb6759efc71cfbbc9.tar.xz | |
[4859] caused crash when handling the %config case
Diffstat (limited to 'src/charon/plugins/stroke/stroke_attribute.c')
| -rw-r--r-- | src/charon/plugins/stroke/stroke_attribute.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/charon/plugins/stroke/stroke_attribute.c b/src/charon/plugins/stroke/stroke_attribute.c index 82a5bce23..7591a1e27 100644 --- a/src/charon/plugins/stroke/stroke_attribute.c +++ b/src/charon/plugins/stroke/stroke_attribute.c @@ -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); |
