]> git.ipfire.org Git - thirdparty/bind9.git/commit
prevent a shutdown hang on non-matching TCP responses
authorEvan Hunt <each@isc.org>
Thu, 2 Dec 2021 20:04:42 +0000 (12:04 -0800)
committerEvan Hunt <each@isc.org>
Wed, 8 Dec 2021 18:22:03 +0000 (10:22 -0800)
commit5f82fc11a9cf2f847540df256584933f6402bfa2
treeaab15b7fb48c7cd32bb6bdcc9f46c1b86c87b95c
parent0059433106e6be0d66d25ee4d7fa3094faafa6f0
prevent a shutdown hang on non-matching TCP responses

When a non-matching DNS response is received by the resolver,
it calls dns_dispatch_getnext() to resume reading. This is necessary
for UDP but not for TCP, because TCP connections automatically
resume reading after any valid DNS response.

This commit adds a 'tcpreading' flag to TCP dispatches, so that
`dispatch_getnext()` can be called multiple times without subsequent
calls having any effect.
lib/dns/dispatch.c