Retry send DNS response without extra section
This commit is contained in:
@@ -53,5 +53,14 @@ func writeDNSResponse(w dns.ResponseWriter, m *dns.Msg) (err error) {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
err = w.WriteMsg(m)
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user