Try to compress too long replies (when forwarding).
This commit is contained in:
1 parent
d220542491
commit
c50c90ea8d
2 files changed
+23
-5
No files matched your search
@@ -395,6 +395,9 @@ func (s *DNSServer) notUsHandler(proto dnsProtocol) dns.HandlerFunc {
|
||||
}
|
||||
Debug.Printf("[dns msgid %d] Given answer by %s for query %s",
|
||||
r.MsgHdr.Id, server, q.Name)
|
||||
if reply.Len() > maxLen {
|
||||
reply.Compress = true
|
||||
}
|
||||
w.WriteMsg(reply)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user