Merge pull request #19338 from swordqiu/hotfix/qj-resolve-local-domain

fix: not resolve local domain with dns records
This commit is contained in:
Zexi Li
2024-01-26 16:05:09 +08:00
committed by GitHub
+5 -3
View File
@@ -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()