Compress recursive answers if they are too big.
This commit is contained in:
1 parent
74e29c8990
commit
4f00dab4c4
1 file changed
+3
@@ -239,6 +239,9 @@ func (d *DNSServer) handleRecursive(client *dns.Client, defaultMaxResponseSize i
|
|||||||
}
|
}
|
||||||
d.ns.debugf("response: %+v", response)
|
d.ns.debugf("response: %+v", response)
|
||||||
response.Id = req.Id
|
response.Id = req.Id
|
||||||
|
if response.Len() > getMaxResponseSize(req, defaultMaxResponseSize) {
|
||||||
|
response.Compress = true
|
||||||
|
}
|
||||||
if err := w.WriteMsg(response); err != nil {
|
if err := w.WriteMsg(response); err != nil {
|
||||||
d.ns.infof("error responding: %v", err)
|
d.ns.infof("error responding: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user