server: drop logging (#1581)

* server: drop logging

Drop this log line; you have no control over it; it doesn't add that
much and can be used to easily ddos you.

* compile
This commit is contained in:
Miek Gieben
2018-03-01 17:59:07 -08:00
committed by GitHub
parent 32671bc983
commit 7b93ce2ec1

View File

@@ -3,7 +3,6 @@ package dnsserver
import ( import (
"fmt" "fmt"
"log"
"net" "net"
"runtime" "runtime"
"sync" "sync"
@@ -284,10 +283,8 @@ func (s *Server) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
return return
} }
// Still here? Error out with REFUSED and some logging // Still here? Error out with REFUSED.
remoteHost := w.RemoteAddr().String()
DefaultErrorFunc(w, r, dns.RcodeRefused) DefaultErrorFunc(w, r, dns.RcodeRefused)
log.Printf("[INFO] \"%s %s %s\" - No such zone at %s (Remote: %s)", dns.Type(r.Question[0].Qtype), dns.Class(r.Question[0].Qclass), q, s.Addr, remoteHost)
} }
// OnStartupComplete lists the sites served by this server // OnStartupComplete lists the sites served by this server