]> granicus.if.org Git - pdns/commit
dnsdist: Keep the TCP connection open on cache hit, generated answers
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 28 Nov 2017 10:02:09 +0000 (11:02 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 13 Feb 2018 13:59:03 +0000 (14:59 +0100)
commitb08dcc66791292f8448a6a99ddaed40221fb2949
tree587d7284624db5144cad2b3f66c334dbefa96c68
parent7b8c947ee7adc34ac512cebd066fb2bebf146647
dnsdist: Keep the TCP connection open on cache hit, generated answers

We used to close the TCP connection right away on cases where that did
not make sense:
- on a cache hit
- on a self-generated answer
- on a servfail answer caused by the lack of usable downstream servers

We still close the TCP connections on drops, dynamic blocks, lack of
usable downstream servers without `setServFailWhenNoServer()` set,
invalid queries, network errors..

(cherry picked from commit dcacff179cc046fa40982bfe22eca36e1b39b665)
pdns/dnsdist-tcp.cc
regression-tests.dnsdist/test_TCPKeepAlive.py [new file with mode: 0644]