Commit 4a2a9556 authored by Miek Gieben's avatar Miek Gieben

Answer REFUSED when we don't host the zone

Change from SERVFAIL to diff. between error and no such zone hosted.

Fixes: #68
parent 2adbdf34
...@@ -306,9 +306,9 @@ func (s *Server) ServeDNS(w dns.ResponseWriter, r *dns.Msg) { ...@@ -306,9 +306,9 @@ func (s *Server) ServeDNS(w dns.ResponseWriter, r *dns.Msg) {
return return
} }
// Still here? Error out with SERVFAIL and some logging // Still here? Error out with REFUSED and some logging
remoteHost := w.RemoteAddr().String() remoteHost := w.RemoteAddr().String()
DefaultErrorFunc(w, r, dns.RcodeServerFailure) DefaultErrorFunc(w, r, dns.RcodeRefused)
log.Printf("[INFO] %s - No such zone at %s (Remote: %s)", q, s.Addr, remoteHost) log.Printf("[INFO] %s - No such zone at %s (Remote: %s)", q, s.Addr, remoteHost)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment