mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-08 21:17:47 +03:00
sd-dhcp-server: do not offer server address
The server address may be in the pool.
(cherry picked from commit 9e0cb8b61f
)
This commit is contained in:
parent
995086918c
commit
336711e062
@ -752,6 +752,9 @@ static bool address_is_in_pool(sd_dhcp_server *server, be32_t address) {
|
||||
if (server->pool_size == 0)
|
||||
return false;
|
||||
|
||||
if (address == server->address)
|
||||
return false;
|
||||
|
||||
if (be32toh(address) < (be32toh(server->subnet) | server->pool_offset) ||
|
||||
be32toh(address) >= (be32toh(server->subnet) | (server->pool_offset + server->pool_size)))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user