mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-02-16 18:09:47 +03:00
dnsforward -- give only ip address to querylog, without port
This commit is contained in:
parent
9b43e07d7f
commit
b0149972cc
1 changed files with 5 additions and 1 deletions
|
@ -472,7 +472,11 @@ func (s *Server) handlePacket(p []byte, addr net.Addr, conn *net.UDPConn) {
|
|||
if upstream != nil {
|
||||
upstreamAddr = upstream.Address()
|
||||
}
|
||||
logRequest(msg, reply, result, elapsed, addr.String(), upstreamAddr)
|
||||
host, _, err := net.SplitHostPort(addr.String())
|
||||
if err != nil {
|
||||
log.Printf("Failed to split %v into host/port: %s", addr, err)
|
||||
}
|
||||
logRequest(msg, reply, result, elapsed, host, upstreamAddr)
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue