From fb91b1e3eb2cc09e0b26bacdbfaf7c11cca57c9f Mon Sep 17 00:00:00 2001 From: Qiu Jian Date: Thu, 25 Jan 2024 15:38:31 +0800 Subject: [PATCH] fix: not resolve local domain with dns records --- pkg/dns/dns.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/dns/dns.go b/pkg/dns/dns.go index 2cedf23040..70c65aa321 100644 --- a/pkg/dns/dns.go +++ b/pkg/dns/dns.go @@ -447,9 +447,11 @@ func (r *SRegionDNS) isMyDomain(req *recordRequest) bool { func (r *SRegionDNS) findRecords(req *recordRequest) ([]msg.Service, error) { // 1. try local dns records table - rrs := r.queryLocalDnsRecords(req) - if len(rrs) > 0 { - return rrs, nil + if !r.isMyDomain(req) { + rrs := r.queryLocalDnsRecords(req) + if len(rrs) > 0 { + return rrs, nil + } } isPlainName := req.IsPlainName()