fix: not resolve local domain with dns records

This commit is contained in:
Qiu Jian
2024-01-25 15:40:08 +08:00
parent 45ee4b1b89
commit fb91b1e3eb
+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()