mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-26 12:23:12 +03:00
Fix processing empty dns result
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user