From 7ebe7ebb93622568e196e0024cd4953e21afd186 Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Thu, 9 Jul 2026 21:45:40 +0100 Subject: [PATCH] Extend closing the netlink in TCP handler processes to *BSD. This may not be necessary, as the socket doesn't revieve broadcasts, but it can't hurt. --- src/dnsmasq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dnsmasq.c b/src/dnsmasq.c index 8375f42..50e8b23 100644 --- a/src/dnsmasq.c +++ b/src/dnsmasq.c @@ -2179,6 +2179,8 @@ static void do_tcp_connection(struct listener *listener, time_t now, int slot) forever awaiting the result. To avoid this close the netlink socket in the child. */ close(daemon->netlinkfd); +#elif defined(HAVE_BSD_NETWORK) + close(daemon->routefd); #endif /* Close inherited listening sockets in the child process. @@ -2316,6 +2318,8 @@ int swap_to_tcp(struct frec *forward, time_t now, int status, struct dns_header forever awaiting the result. To avoid this close the netlink socket in the child. */ close(daemon->netlinkfd); +#elif defined(HAVE_BSD_NETWORK) + close(daemon->routefd); #endif /* Close inherited listening sockets in the child process.