35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
From 80498fab01342243707a482f9b42c38a7c564026 Mon Sep 17 00:00:00 2001
|
|
From: Erik Karlsson <erik.karlsson@iopsys.eu>
|
|
Date: Mon, 29 Apr 2024 20:44:13 +0200
|
|
Subject: [PATCH] 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>
|
|
|
|
Reference:https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=80498fab01342243707a482f9b42c38a7c564026
|
|
Conflict:NA
|
|
|
|
---
|
|
src/dnsmasq.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/src/dnsmasq.c b/src/dnsmasq.c
|
|
index c14240e..48e402f 100644
|
|
--- a/src/dnsmasq.c
|
|
+++ b/src/dnsmasq.c
|
|
@@ -1517,6 +1517,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)
|
|
--
|
|
2.33.0
|
|
|