diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-10-13 11:56:16 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-10-16 11:59:43 +0200 |
commit | 361cb9e910e77f657ad39e0be4684b8028711a0c (patch) | |
tree | d01c2c749d1ded405fbec6b5c4feb749f97f80bf /lib/ippool.c | |
parent | 5bacb59a6c314001a053977acb4aece4695b356a (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/ippool.c')
-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 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 */ |