Merge pull request #19339 from swordqiu/automated-cherry-pick-of-#19338-upstream-release-3.11

Automated cherry pick of #19338: fix: not resolve local domain with dns records
This commit is contained in:
Zexi Li
2024-01-26 16:05:18 +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()