Set EDNS0 when no extra options are set by the dns client (#2195)

This commit is contained in:
Maycon Santos 2024-06-25 17:18:04 +02:00 committed by GitHub
parent 43a8ba97e3
commit d2157bda66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,6 +78,10 @@ func (u *upstreamResolverBase) ServeDNS(w dns.ResponseWriter, r *dns.Msg) {
}()
log.WithField("question", r.Question[0]).Trace("received an upstream question")
// set the EDNS0 buffer size to 4096 bytes to support larger dns records
if r.Extra == nil {
r.SetEdns0(4096, true)
}
select {
case <-u.ctx.Done():