[Dnsmasq-discuss] [PATCH] Update DNS records after pruning DHCP leases
Geert Stappers
stappers at stappers.nl
Fri May 3 20:26:29 UTC 2024
On Mon, Apr 29, 2024 at 08:44:13PM +0200, Erik Karlsson wrote:
> From: Erik Karlsson <erik.karlsson at iopsys.eu>
>
> 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 at iopsys.eu>
> ---
> src/dnsmasq.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/dnsmasq.c b/src/dnsmasq.c
> index a9f26ae..1be3b82 100644
> --- a/src/dnsmasq.c
> +++ b/src/dnsmasq.c
> @@ -1518,6 +1518,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.43.2
>
Looks good to me.
For preventing that the patch falls through the cracks,
send the patch to email address '~stappers/dnsmasqmlpc at lists.sr.ht'
to get it at https://lists.sr.ht/~stappers/dnsmasqmlpc/patches
(mlpc: mailinglistpatchcollector)
Groeten
Geert Stappers
--
Silence is hard to parse
More information about the Dnsmasq-discuss
mailing list