Properly remove broadcast address from mem pools
authorTobias Brunner <tobias@strongswan.org>
Mon, 10 Sep 2012 09:44:18 +0000 (11:44 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 10 Sep 2012 09:44:18 +0000 (11:44 +0200)
src/libhydra/attributes/mem_pool.c

index b2fed27..39159bf 100644 (file)
@@ -499,7 +499,7 @@ mem_pool_t *mem_pool_create(char *name, host_t *base, int bits)
                if (this->size > 2)
                {       /* do not use first and last addresses of a block */
                        this->unused++;
-                       this->size--;
+                       this->size -= 2;
                }
                this->base = base->clone(base);
        }