mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Free sockets awaiting upstream DNS replies ASAP.
Once we have a good answer, close the socket so that the fd can be reused during DNSSEC validation and we don't have to read and discard more replies from other servers.
This commit is contained in:
@@ -1144,6 +1144,13 @@ void reply_query(int fd, time_t now)
|
||||
}
|
||||
|
||||
forward->sentto = server;
|
||||
|
||||
/* We have a good answer, and will now validate it or return it.
|
||||
It may be some time before this the validation completes, but we don't need
|
||||
any more answers, so close the socket(s) on which we were expecting
|
||||
answers, to conserve file descriptors, and to save work reading and
|
||||
discarding answers for other upstreams. */
|
||||
free_rfds(&forward->rfds);
|
||||
|
||||
#ifdef HAVE_DNSSEC
|
||||
if ((forward->sentto->flags & SERV_DO_DNSSEC) &&
|
||||
|
||||
Reference in New Issue
Block a user