]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
lib/selection{,_iter}.c: allow switching back to UDP
authorŠtěpán Balážik <stepan.balazik@nic.cz>
Thu, 18 Feb 2021 11:10:26 +0000 (12:10 +0100)
committerŠtěpán Balážik <stepan.balazik@nic.cz>
Thu, 18 Feb 2021 15:51:57 +0000 (16:51 +0100)
commitf032e5ec056c332458a3cf766a0875c3918b725d
tree7e620a02fc868741efba69cfdd7f610c82373f23
parent34b92c92c75089d34f7e86d131afb3a785cbe992
lib/selection{,_iter}.c: allow switching back to UDP

Switching to TCP instead of querying very slow servers over UDP has had
unwanted side effect – we would sometimes get stuck with a server
permanently switched to TCP. And if the server happens to not reply over
TCP we were in trouble.

Therefore after we TCP connect fails or timeouts we provide one last
chance for the server over UDP. This will not prevent the next request
to try TCP again on this server again, but we don't care because
DNS MUST ******* work over TCP.
lib/selection.c
lib/selection.h
lib/selection_iter.c