mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
Retry send DNS response without extra section
This commit is contained in:
parent
4e14439112
commit
991cebb3d3
1 changed files with 9 additions and 0 deletions
|
@ -53,5 +53,14 @@ func writeDNSResponse(w dns.ResponseWriter, m *dns.Msg) (err error) {
|
|||
}()
|
||||
|
||||
err = w.WriteMsg(m)
|
||||
if err == nil {
|
||||
// If we receive an error we might have exceeded the message size with all
|
||||
// our extra information records. Retry again without the extra section.
|
||||
m.Extra = nil
|
||||
noExtraErr := w.WriteMsg(m)
|
||||
if noExtraErr == nil {
|
||||
log.Warningf("nameserver: failed to write dns message with extra section: %s", err)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue