summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-08-29 00:18:20 +0200
committerTom Gundersen <teg@jklm.no>2015-08-31 21:42:33 +0200
commit9b3a67c55b7df6642a0389306c513b17c211f280 (patch)
treec0356bf32d2fc716ba9716a72c6ee4012e614f7f /src/network/networkd-link.c
parent61986155d273342ffaf5be4d6a4386be96f9b46b (diff)
networkd: dhcp-server - allow configuration of the pool
The constraints we place on the pool is that it is a contiguous sequence of addresses in the same subnet as the server address, not including the subnet nor broadcast addresses, but possibly including the server address itself. If the server address is included in the pool it is (obviously) reserved and not handed out to clients.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index c5434147ed..979f3115f6 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -742,7 +742,8 @@ static int link_enter_set_addresses(Link *link) {
}
/* use the server address' subnet as the pool */
- r = sd_dhcp_server_configure_pool(link->dhcp_server, &address->in_addr.in, address->prefixlen, 0, 0);
+ r = sd_dhcp_server_configure_pool(link->dhcp_server, &address->in_addr.in, address->prefixlen,
+ link->network->dhcp_server_pool_offset, link->network->dhcp_server_pool_size);
if (r < 0)
return r;