aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-10-13 11:56:16 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2017-10-16 11:59:43 +0200
commit361cb9e910e77f657ad39e0be4684b8028711a0c (patch)
treed01c2c749d1ded405fbec6b5c4feb749f97f80bf /lib
parent5bacb59a6c314001a053977acb4aece4695b356a (diff)
lib/ippool: Fix listsize calculated 1 elem too small
Take the chance this commit is changing test output to also remove use of IPPOOL_NOGATEWAY which is going to be removed soon, and instead test IPPOOL_NOBROADCAST. Change-Id: I95c24bc690490155bec9e3933d678e4668d7745f
Diffstat (limited to 'lib')
-rw-r--r--lib/ippool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ippool.c b/lib/ippool.c
index d9164a3..03323e2 100644
--- a/lib/ippool.c
+++ b/lib/ippool.c
@@ -215,7 +215,7 @@ int ippool_new(struct ippool_t **this, const struct in46_prefix *dyn, const stru
flags |= IPPOOL_NONETWORK;
}
- dynsize = (1 << (addr.len*8 - addrprefixlen)) -1;
+ dynsize = (1 << (addr.len*8 - addrprefixlen));
if (flags & IPPOOL_NONETWORK) /* Exclude network address from pool */
dynsize--;
if (flags & IPPOOL_NOGATEWAY) /* Exclude gateway address from pool */