summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2014-08-19 07:37:17 +0200
committerSteven Barth <steven@midlink.org>2014-08-19 07:37:17 +0200
commit710744ecea73b6a3cf560776e298741b04fb727a (patch)
tree2f7d2c454bda0ad710546e532913ad4f4f72a2d8 /src
parent4bdb0dd11d0b6de3d022018ca3fec4d0b5c50702 (diff)
dhcpv4: fix manual dhcp-ranges
Diffstat (limited to 'src')
-rw-r--r--src/dhcpv4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dhcpv4.c b/src/dhcpv4.c
index 92a1397..89750b2 100644
--- a/src/dhcpv4.c
+++ b/src/dhcpv4.c
@@ -137,8 +137,8 @@ int setup_dhcpv4_interface(struct interface *iface, bool enable)
if (start && end && start < end &&
start > ntohl(addr.s_addr & ~mask.s_addr) &&
- (start & ntohl(mask.s_addr)) == start &&
- (end & ntohl(mask.s_addr)) == end) {
+ (start & ntohl(~mask.s_addr)) == start &&
+ (end & ntohl(~mask.s_addr)) == end) {
iface->dhcpv4_start.s_addr = htonl(start) |
(addr.s_addr & mask.s_addr);
iface->dhcpv4_end.s_addr = htonl(end) |