dns2tcp
dns2tcp copied to clipboard
Satisfy some public resolvers by replying with SERVFAIL to unparsed requests
TL;DR—fixes some recursive resolvers not working with dns2tcp.
A couple of popular public resolvers (e.g. Cloudflare 1.1.1.1
, Yandex 77.88.8.8
) don't actually adhere to forwarding client's DNS requests.
For example, on requesting TXT AAAAAIoRAA.=auth.your-dns2tcp-domain.com.
they sometimes go and try to resolve A =auth.your-dns2tcp-domain.com.
dns2tcpd currently just ignores those requests, which makes the recursive resolver to just timeout and return with SERVFAIL.
This patch makes dns2tcpd respond with SERVFAIL to unparsed requests. In this case, recursive resolver receives the reply, and re-requests the actual TXT that the client was asking it in the first place.