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-13 14:32:55 +0200 |
commit | d6ede37b7e62ca7e3544b7319b9234c564365dca (patch) | |
tree | 479952fe947940beeaec32b8b81f214663fb741c /lib | |
parent | 81ff18c9d7dde7541963922ddd22de4bba2eca58 (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.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 */ |