mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-15 11:22:49 +03:00
Merge pull request #118 in DNS/adguard-dns from bugfix/472 to master
* commit '8411de88879e13acbe6f6a42d8659af91a511467': Don't log ANY requests if refuseAny is enabled.
This commit is contained in:
commit
69a387547d
@ -499,8 +499,18 @@ func (s *Server) handlePacket(p []byte, addr net.Addr, conn *net.UDPConn) {
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// query logging and stats counters
|
||||
if s.QueryLogEnabled {
|
||||
//
|
||||
|
||||
shouldLog := true
|
||||
|
||||
// don't log ANY request if refuseAny is enabled
|
||||
if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.RefuseAny {
|
||||
shouldLog = false
|
||||
}
|
||||
|
||||
if s.QueryLogEnabled && shouldLog {
|
||||
elapsed := time.Since(start)
|
||||
upstreamAddr := ""
|
||||
if upstream != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user