diff options
Diffstat (limited to 'src/libhydra/attributes/mem_pool.c')
-rw-r--r-- | src/libhydra/attributes/mem_pool.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libhydra/attributes/mem_pool.c b/src/libhydra/attributes/mem_pool.c index f55b3a7d1..b2fed2703 100644 --- a/src/libhydra/attributes/mem_pool.c +++ b/src/libhydra/attributes/mem_pool.c @@ -162,6 +162,12 @@ METHOD(mem_pool_t, get_name, const char*, return this->name; } +METHOD(mem_pool_t, get_base, host_t*, + private_mem_pool_t *this) +{ + return this->base; +} + METHOD(mem_pool_t, get_size, u_int, private_mem_pool_t *this) { @@ -220,11 +226,9 @@ METHOD(mem_pool_t, acquire_address, host_t*, return requested->clone(requested); } - if (!requested->is_anyaddr(requested) && - requested->get_family(requested) != + if (requested->get_family(requested) != this->base->get_family(this->base)) { - DBG1(DBG_CFG, "IP pool address family mismatch"); return NULL; } @@ -463,6 +467,7 @@ mem_pool_t *mem_pool_create(char *name, host_t *base, int bits) INIT(this, .public = { .get_name = _get_name, + .get_base = _get_base, .get_size = _get_size, .get_online = _get_online, .get_offline = _get_offline, |