mirror of
https://github.com/0xERR0R/blocky.git
synced 2026-10-12 02:01:13 +00:00
With `fqdnOnly` enabled, a query for a dotless name was answered with a dns.Msg carrying only an Rcode: NewEmptyResponse called neither SetReply nor SetRcode, so the message echoed back neither the request id nor the question section. Conforming clients discard such an answer as an id mismatch and go on waiting for a reply that never comes, so users saw a timeout instead of the NXDOMAIN the documentation promises. Build the answer with NewResponseWithRcode instead, whose SetRcode echoes id and question, and drop NewEmptyResponse: FQDNOnlyResolver was its only caller, and every other resolver already replies via SetReply. The e2e test accepted "any DNS error" as a valid rejection, which is why this went unnoticed; it now asserts that the client actually receives NXDOMAIN with its question echoed back. Claude-Session: https://claude.ai/code/session_01QyEFFhrY3j9QtGzR2wUJr9