Update DNS records after pruning DHCP leases

Not doing so can result in a use after free since the name for DHCP
derived DNS records is represented as a pointer into the DHCP lease
table. Update will only happen when necessary since lease_update_dns
tests internally on dns_dirty and the force argument is zero.

Signed-off-by: Erik Karlsson <erik.karlsson@iopsys.eu>
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
Erik Karlsson 2024-05-18 09:13:54 +02:00 committed by DL6ER
parent 95b1dc1c72
commit 98407e3a58
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
1 changed files with 1 additions and 0 deletions

View File

@ -1534,6 +1534,7 @@ static void async_event(int pipe, time_t now)
{
lease_prune(NULL, now);
lease_update_file(now);
lease_update_dns(0);
}
#ifdef HAVE_DHCP6
else if (daemon->doing_ra)