mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-20 11:29:35 +00:00
bc80b93cd10a3e4f6a846dd3db0cf73af79b1a1f
When `tcp_request()` answers from stale cache data, it closes the connection right away, so that the child process can refresh the name and exit. A query the client has already sent on that connection is never read, and its answer is lost. glibc runs into this: after a truncated UDP reply, it sends the A and AAAA queries together on one TCP connection, gets EOF after the first answer and fails the lookup without retrying the second query. In a test with both answers expired, 7 of 20 such lookups lost the second answer. Close the connection only if the client has not sent anything else yet. Otherwise, refresh the name and go on answering the queries on the connection, as for any other forwarded query. Signed-off-by: DL6ER <dl6er@dl6er.de>
Languages
C
94.3%
Perl
2.2%
HTML
1.2%
Shell
1%
Makefile
0.6%
Other
0.6%