From d2157bda66dce3467c1754d9fbf5458467ae8549 Mon Sep 17 00:00:00 2001 From: Maycon Santos Date: Tue, 25 Jun 2024 17:18:04 +0200 Subject: [PATCH] Set EDNS0 when no extra options are set by the dns client (#2195) --- client/internal/dns/upstream.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/internal/dns/upstream.go b/client/internal/dns/upstream.go index e82c98fbc..3a05d0523 100644 --- a/client/internal/dns/upstream.go +++ b/client/internal/dns/upstream.go @@ -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():