From 769446a8c7b640f7a9e0265d8e1bfc1b14a73b24 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 27 Aug 2012 16:26:01 +0200 Subject: Check address family in HA virtual IP backend --- src/libcharon/plugins/ha/ha_attribute.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libcharon/plugins/ha/ha_attribute.c') 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) -- cgit v1.2.3