From d6b0673580db457ad37a61b205df68096ab460ee Mon Sep 17 00:00:00 2001 From: Viktor Liu <17948409+lixmal@users.noreply.github.com> Date: Thu, 10 Apr 2025 10:38:47 +0200 Subject: [PATCH] [client] Support CNAME in local resolver (#3646) --- client/internal/dns/local.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/internal/dns/local.go b/client/internal/dns/local.go index 3a25a23b6..76e18e3ce 100644 --- a/client/internal/dns/local.go +++ b/client/internal/dns/local.go @@ -71,6 +71,12 @@ func (d *localResolver) lookupRecords(r *dns.Msg) []dns.RR { value, found := d.records.Load(key) if !found { + // alternatively check if we have a cname + if question.Qtype != dns.TypeCNAME { + r.Question[0].Qtype = dns.TypeCNAME + return d.lookupRecords(r) + } + return nil }