From b0e155d316572ad9151a7863ab96ca84f31540c7 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Tue, 19 Dec 2017 13:32:54 +0100 Subject: [PATCH] nic_router: fix available IP count in DHCP server --- repos/os/src/server/nic_router/dhcp_server.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/os/src/server/nic_router/dhcp_server.cc b/repos/os/src/server/nic_router/dhcp_server.cc index 979b37f16..757cb92bb 100644 --- a/repos/os/src/server/nic_router/dhcp_server.cc +++ b/repos/os/src/server/nic_router/dhcp_server.cc @@ -32,7 +32,7 @@ Dhcp_server::Dhcp_server(Xml_node const node, _ip_first(node.attribute_value("ip_first", Ipv4_address())), _ip_last(node.attribute_value("ip_last", Ipv4_address())), _ip_first_raw(_ip_first.to_uint32_little_endian()), - _ip_count(_ip_last.to_uint32_little_endian() - _ip_first_raw), + _ip_count(_ip_last.to_uint32_little_endian() - _ip_first_raw + 1), _ip_alloc(alloc, _ip_count) { if (!interface.prefix_matches(_ip_first) ||