aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/ippool_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/ippool_test.c')
-rw-r--r--tests/lib/ippool_test.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/lib/ippool_test.c b/tests/lib/ippool_test.c
index e8604d9..1d0c3a2 100644
--- a/tests/lib/ippool_test.c
+++ b/tests/lib/ippool_test.c
@@ -92,20 +92,20 @@ static int test_pool_sizes(void)
{
struct ippool_t *pool;
- /* 255 addresses [0..254] */
- test_pool_size("192.168.23.0/24", 0, 255);
+ /* 256 addresses [0..255] */
+ test_pool_size("192.168.23.0/24", 0, 256);
- /* 254 addresses [1..254] */
- test_pool_size("192.168.23.0/24", IPPOOL_NONETWORK, 254);
+ /* 255 addresses [1..255] */
+ test_pool_size("192.168.23.0/24", IPPOOL_NONETWORK, 255);
- /* 253 addresses [2..254] */
- test_pool_size("192.168.23.0/24", IPPOOL_NOGATEWAY, 253);
+ /* 254 addresses [1..254] */
+ test_pool_size("192.168.23.0/24", IPPOOL_NONETWORK | IPPOOL_NOBROADCAST, 254);
- /* 65533 addresses [3..255.254] */
- test_pool_size("192.168.0.0/16", IPPOOL_NOGATEWAY, 65533);
+ /* 65534 addresses [0.1..255.254] */
+ test_pool_size("192.168.0.0/16", IPPOOL_NONETWORK | IPPOOL_NOBROADCAST, 65534);
- /* 255 prefixes of /64 each */
- test_pool_size("2001:DB8::/56", 0, 255);
+ /* 256 prefixes of /64 each */
+ test_pool_size("2001:DB8::/56", 0, 256);
}
int main(int argc, char **argv)