]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Check address family in HA virtual IP backend
authorMartin Willi <martin@revosec.ch>
Mon, 27 Aug 2012 14:26:01 +0000 (16:26 +0200)
committerMartin Willi <martin@revosec.ch>
Thu, 30 Aug 2012 14:43:44 +0000 (16:43 +0200)
src/libcharon/plugins/ha/ha_attribute.c

index 64bd2b8b7b9bb1db695692a44a0ca0116d51b914..f18c58b6a9ba9d80abdf9ab305a3e0f31056c112 100644 (file)
@@ -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)