diff options
author | Martin Willi <martin@revosec.ch> | 2012-08-27 16:26:01 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-08-30 16:43:44 +0200 |
commit | 769446a8c7b640f7a9e0265d8e1bfc1b14a73b24 (patch) | |
tree | 3dc9dfa5d9e4f34c7385b9594b35d5dea7eb248c /src | |
parent | 40e90898895c20d4807f14957bd58faa663127f0 (diff) | |
download | strongswan-769446a8c7b640f7a9e0265d8e1bfc1b14a73b24.tar.bz2 strongswan-769446a8c7b640f7a9e0265d8e1bfc1b14a73b24.tar.xz |
Check address family in HA virtual IP backend
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/plugins/ha/ha_attribute.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libcharon/plugins/ha/ha_attribute.c b/src/libcharon/plugins/ha/ha_attribute.c index 64bd2b8b7..f18c58b6a 100644 --- a/src/libcharon/plugins/ha/ha_attribute.c +++ b/src/libcharon/plugins/ha/ha_attribute.c @@ -181,6 +181,12 @@ METHOD(attribute_provider_t, acquire_address, host_t*, pool = get_pool(this, name); if (pool) { + if (pool->base->get_family(pool->base) != + requested->get_family(requested)) + { + this->mutex->unlock(this->mutex); + return NULL; + } for (byte = 0; byte < pool->size / 8; byte++) { if (pool->mask[byte] != 0xFF) |