]> git.ipfire.org Git - thirdparty/pdns.git/commit
rec: Terminate TCP connections instead of 'ignoring' errors
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 1 Oct 2020 16:20:21 +0000 (18:20 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 1 Oct 2020 16:20:21 +0000 (18:20 +0200)
commit675520302a63afaacd8079bec4d2aac5e108fe93
tree2fe22f3851241dc0756de78cdf137e07f2c768ed
parent472f3e1f3f9e3f763c3621e8d557ca85116ecff5
rec: Terminate TCP connections instead of 'ignoring' errors

We used to ignore questions that we consider invalid (unexpected
opcode, qdcount != 1, QR=1, parse error, ...) but also those
received from source addresses blocked by ipfilter, still waiting
for a new question to come up on the socket.
That might be fine for clients that will keep sending queries, even
though they will still end up wondering what happened to the ignored
queries, but some clients like dnsdist will wait until a response is
sent, or a time out occurs.
Closing the TCP connection instead allows dnsdist to keep going,
possibly retrying over a new connection but finally giving up,
instead of keeping the connection alive.
pdns/pdns_recursor.cc