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.
(cherry picked from commit bd1a3eb65b
)
This commit is contained in:
parent
0478298bf9
commit
995086918c
@ -756,6 +756,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)))
|
||||
return false;
|
||||
|
||||
if (hashmap_contains(server->static_leases_by_address, UINT32_TO_PTR(address)))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user