mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-12 20:03:38 +00:00
Fix processing empty dns result
This commit is contained in:
parent
2ae4da524e
commit
80cfc9a25b
|
@ -82,6 +82,9 @@ func (r *Router) Lookup(ctx context.Context, domain string, strategy dns.DomainS
|
||||||
r.dnsLogger.InfoContext(ctx, "lookup succeed for ", domain, ": ", strings.Join(F.MapToString(addrs), " "))
|
r.dnsLogger.InfoContext(ctx, "lookup succeed for ", domain, ": ", strings.Join(F.MapToString(addrs), " "))
|
||||||
} else {
|
} else {
|
||||||
r.dnsLogger.ErrorContext(ctx, E.Cause(err, "lookup failed for ", domain))
|
r.dnsLogger.ErrorContext(ctx, E.Cause(err, "lookup failed for ", domain))
|
||||||
|
if err == nil {
|
||||||
|
err = dns.RCodeNameError
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return addrs, err
|
return addrs, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue