dns: send nil response instead of dropping it when dnsnoaaaa is enabled

This commit is contained in:
nadoo committed 2022-01-22 13:13:20 +08:00
1 parent 2754fdeb60
commit a919ac3469
4 files changed
+16 -12

No files matched your search

+2 -2
View File
@@ -80,13 +80,13 @@ func (s *Server) ServePacket(pc net.PacketConn, caddr net.Addr, reqBytes []byte)
}()
if err != nil {
log.F("[dns] error in exchange: %s", err)
log.F("[dns] error in exchange for %s: %s", caddr, err)
return
}
_, err = pc.WriteTo(respBytes, caddr)
if err != nil {
log.F("[dns] error in local write: %s", err)
log.F("[dns] error in local write to %s: %s", caddr, err)
return
}
}