fix: return NXDOMAIN for .local mDNS queries #18

Merged
razvandimescu merged 1 commits from fix/local-domain-servfail into main 2026-03-29 04:42:33 +08:00
razvandimescu commented 2026-03-29 01:15:46 +08:00 (Migrated from github.com)

Summary

  • .local is reserved for mDNS (RFC 6762) and cannot be resolved by upstream DNS servers
  • Queries like _grpc_config.localhost.local were falling through to upstream resolution, timing out (~560ms), and returning SERVFAIL
  • Added .local to is_special_use_domain() so these queries get an immediate NXDOMAIN response locally

Test plan

  • Verify dig @127.0.0.1 _grpc_config.localhost.local TXT returns NXDOMAIN (not SERVFAIL)
  • Verify .local queries no longer appear with SERVFAIL in the dashboard query log
  • Verify normal DNS resolution is unaffected
  • make all passes (fmt, clippy, audit, build, 82 tests)

🤖 Generated with Claude Code

## Summary - `.local` is reserved for mDNS (RFC 6762) and cannot be resolved by upstream DNS servers - Queries like `_grpc_config.localhost.local` were falling through to upstream resolution, timing out (~560ms), and returning SERVFAIL - Added `.local` to `is_special_use_domain()` so these queries get an immediate NXDOMAIN response locally ## Test plan - [ ] Verify `dig @127.0.0.1 _grpc_config.localhost.local TXT` returns NXDOMAIN (not SERVFAIL) - [ ] Verify `.local` queries no longer appear with SERVFAIL in the dashboard query log - [ ] Verify normal DNS resolution is unaffected - [ ] `make all` passes (fmt, clippy, audit, build, 82 tests) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.