diff options
author | 2017-11-10 11:19:49 +0000 | |
---|---|---|
committer | 2017-11-10 11:19:49 +0000 | |
commit | 4443b4a09645f2a7c1507af0b35f74c8a712902e (patch) | |
tree | 8f04e2b6159403850948fd10617267a977d5dee9 | |
parent | 93e481a2479ae5215d5b07372fd6ab85c434d8d4 (diff) | |
download | coredns-4443b4a09645f2a7c1507af0b35f74c8a712902e.tar.gz coredns-4443b4a09645f2a7c1507af0b35f74c8a712902e.tar.zst coredns-4443b4a09645f2a7c1507af0b35f74c8a712902e.zip |
server: update comment (#1213)
Because we have our own mux we can't depend on the dns.Mux to do the
Question section checking for us. Clarify this in the comment.
-rw-r--r-- | core/dnsserver/server.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/dnsserver/server.go b/core/dnsserver/server.go index 38d8600c7..6fe26e7dc 100644 --- a/core/dnsserver/server.go +++ b/core/dnsserver/server.go @@ -179,8 +179,8 @@ func (s *Server) Address() string { return s.Addr } // defined in the request so that the correct zone // (configuration and plugin stack) will handle the request. func (s *Server) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) { - // our dns library protects us against really invalid packets, we can still - // get semi valid packets. Drop them here. + // The default dns.Mux checks the question section size, but we have our + // own mux here. Check if we have a question section. If not drop them here. if r == nil || len(r.Question) == 0 { DefaultErrorFunc(w, r, dns.RcodeServerFailure) return |