diff options
-rw-r--r-- | lib/ippool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ippool.c b/lib/ippool.c index 55a41d0..a9a64be 100644 --- a/lib/ippool.c +++ b/lib/ippool.c @@ -240,7 +240,7 @@ int ippool_new(struct ippool_t **this, const struct in46_prefix *dyn, const stru stataddr = stat->addr; stataddrprefixlen = stat->prefixlen; - statsize = (1 << (addr.len - stataddrprefixlen + 1)) -1; + statsize = (1 << (stataddr.len*8 - stataddrprefixlen)); if (statsize > IPPOOL_STATSIZE) statsize = IPPOOL_STATSIZE; } |