mirror of
https://github.com/coredns/coredns.git
synced 2025-10-14 00:41:12 +02:00
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.
This commit is contained in:
parent
93e481a247
commit
4443b4a096
@ -179,8 +179,8 @@ func (s *Server) Address() string { return s.Addr }
|
|||||||
// defined in the request so that the correct zone
|
// defined in the request so that the correct zone
|
||||||
// (configuration and plugin stack) will handle the request.
|
// (configuration and plugin stack) will handle the request.
|
||||||
func (s *Server) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) {
|
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
|
// The default dns.Mux checks the question section size, but we have our
|
||||||
// get semi valid packets. Drop them here.
|
// own mux here. Check if we have a question section. If not drop them here.
|
||||||
if r == nil || len(r.Question) == 0 {
|
if r == nil || len(r.Question) == 0 {
|
||||||
DefaultErrorFunc(w, r, dns.RcodeServerFailure)
|
DefaultErrorFunc(w, r, dns.RcodeServerFailure)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user