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 79e43e7..f38c1be 100644
--- a/tests/lib/ippool_test.c
+++ b/tests/lib/ippool_test.c
@@ -90,20 +90,20 @@ static void test_pool_size(const char *pfx, unsigned int flags, unsigned int exp
static void test_pool_sizes(void)
{
- /* 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)