mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-05-31 12:49:22 +00:00
Do not cache DNS responses with empty answers
This commit is contained in:
parent
44559fb7b9
commit
1955002ed8
1 changed files with 1 additions and 0 deletions
|
|
@ -214,6 +214,7 @@ func (c *Client) Exchange(ctx context.Context, transport adapter.DNSTransport, m
|
|||
response.Answer = append(response.Answer, validResponse.Answer...)
|
||||
}
|
||||
}*/
|
||||
disableCache = disableCache || response.Rcode != dns.RcodeSuccess || len(response.Answer) == 0
|
||||
if responseChecker != nil {
|
||||
var rejected bool
|
||||
// TODO: add accept_any rule and support to check response instead of addresses
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue