diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-02-09 10:45:15 +0100 |
---|---|---|
committer | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2012-02-13 18:03:41 +0100 |
commit | 768a37983196a19aedf8b8c0e1fc20dd436c5aa0 (patch) | |
tree | 6f3ff5facd8d5b266cc8e31b46c61f4fbe1f6be1 | |
parent | da94095914e25fd26a793d348884b39e913a56d2 (diff) | |
download | connman-768a37983196a19aedf8b8c0e1fc20dd436c5aa0.tar.gz connman-768a37983196a19aedf8b8c0e1fc20dd436c5aa0.tar.bz2 connman-768a37983196a19aedf8b8c0e1fc20dd436c5aa0.zip |
ippool: Fix 16 bit block iterator
-rw-r--r-- | src/ippool.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ippool.c b/src/ippool.c index f0952ff1..a54de37c 100644 --- a/src/ippool.c +++ b/src/ippool.c @@ -110,7 +110,7 @@ static uint32_t next_block(uint32_t block) next += 1; if (next == 255) { - if ((block & 0xffffff00) == block_16_bits) { + if ((block & 0xffff0000) == block_16_bits) { /* * Reached the end of the 16 bit block, switch * to the 20-bit block. @@ -337,8 +337,7 @@ int __connman_ippool_init(void) { DBG(""); - /* We start at 254 by default to avoid common addresses */ - block_16_bits = ntohl(inet_addr("192.168.254.0")); + block_16_bits = ntohl(inet_addr("192.168.0.0")); block_20_bits = ntohl(inet_addr("172.16.0.0")); block_24_bits = ntohl(inet_addr("10.0.0.0")); subnet_mask_24 = ntohl(inet_addr("255.255.255.0")); |