commit - ed53ec5febe195955fd7f0bf9befeec804bf3b52
commit + 32888e323dda0ea3d9a7112643732358d57509e3
blob - 3df79839d172a29ad3cc80439a6b0383ee0260f8
blob + 0ebdfab7d742641360555a24e2223c7b1da0faaf
--- server.go
+++ server.go
return srv.ListenAndServe()
}
-// DefaultHandler responds to all DNS messages identically; all message
+// DefaultHandler responds to all DNS messages identically; all messages
// are refused. It is intended as a safe default for a Server which
// does not set a Handler.
var DefaultHandler = Refuse
}
// NameError replies to the message with a Name error (NXDOMAIN) message.
-// The SOA resource and its resource header rh are included in the reply.
-// Servers performing recursive resolution should set authoritative to false and
-// authoritative servers should set this to true.
+// The SOA resource and resource header are included in the reply.
+// Authoritative servers for the domain in msg should set authoritative to true.
+// Others, such as recursive resolvers answers queries, should set this to false.
func NameError(w ResponseWriter, msg *dnsmessage.Message, rh dnsmessage.ResourceHeader, soa dnsmessage.SOAResource, authoritative bool) {
buf := make([]byte, 2, 512)
header := dnsmessage.Header{