Skip to content

Commit

Permalink
Set EDNS0 when no extra options are set by the dns client (#2195)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlsmaycon authored Jun 25, 2024
1 parent 43a8ba9 commit d2157bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/internal/dns/upstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit d2157bd

Please sign in to comment.