mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
sd-dhcp-server: do not assign address reserved for static leases to non-matching clients
This fix the root cause of the issue #22253.
This commit is contained in:
parent
7e98fe05a0
commit
bd1a3eb65b
@ -801,6 +801,9 @@ static bool address_is_in_pool(sd_dhcp_server *server, be32_t address) {
|
|||||||
be32toh(address) >= (be32toh(server->subnet) | (server->pool_offset + server->pool_size)))
|
be32toh(address) >= (be32toh(server->subnet) | (server->pool_offset + server->pool_size)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (hashmap_contains(server->static_leases_by_address, UINT32_TO_PTR(address)))
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user