Skip to content

Report DNS server failures as temperror, not absence - #3

Merged
simonleva merged 1 commit into
mainfrom
resolver-dnsruby
Jul 28, 2026
Merged

Report DNS server failures as temperror, not absence#3
simonleva merged 1 commit into
mainfrom
resolver-dnsruby

Conversation

@simonleva

Copy link
Copy Markdown
Contributor

Summary

  • Fix SERVFAIL/REFUSED being treated as absence (none / DKIM permerror) by replacing stdlib Resolv with dnsruby, which surfaces each rcode distinctly as ServerFailuretemperror
  • NXDOMAIN and NODATA still mean absence; caching and DNSSEC stay off; answer shaping covers CNAME+TXT, PTR domainname, joined TXT strings, sorted MX, lowercased IPv6
  • Add loopback nameserver harness and end-to-end tests that hold the resolver seam (FakeResolver alone cannot); bump to 0.3.0 with changelog noting the verdict-distribution shift

Resolv collapses SERVFAIL and REFUSED into the same empty answer as
NXDOMAIN, so a nameserver that refused to speak was read as a domain
that published nothing — SPF/DMARC none, DKIM permerror. Call sites
already handled ServerFailure; the resolver never raised it.

Switch the default resolver to dnsruby, which reports each rcode as its
own class. SERVFAIL and REFUSED become temperror; NXDOMAIN and NODATA
stay absence. Caching and DNSSEC stay off.
@simonleva
simonleva merged commit 4b693f4 into main Jul 28, 2026
1 check passed
@simonleva
simonleva deleted the resolver-dnsruby branch July 28, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant