mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
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>
This commit is contained in:
committed by
Simon Kelley
parent
ea84abe3e9
commit
80498fab01
@@ -1517,6 +1517,7 @@ static void async_event(int pipe, time_t now)
|
|||||||
{
|
{
|
||||||
lease_prune(NULL, now);
|
lease_prune(NULL, now);
|
||||||
lease_update_file(now);
|
lease_update_file(now);
|
||||||
|
lease_update_dns(0);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_DHCP6
|
#ifdef HAVE_DHCP6
|
||||||
else if (daemon->doing_ra)
|
else if (daemon->doing_ra)
|
||||||
|
|||||||
Reference in New Issue
Block a user