Skip to content

Commit 8b60840

Browse files
committed
Do not cache truncated messages
Fixes #774
1 parent a389067 commit 8b60840

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

dnscrypt-proxy/plugin_cache.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ func (plugin *PluginCacheResponse) Eval(pluginsState *PluginsState, msg *dns.Msg
5252
if msg.Rcode != dns.RcodeSuccess && msg.Rcode != dns.RcodeNameError && msg.Rcode != dns.RcodeNotAuth {
5353
return nil
5454
}
55+
if msg.Truncated {
56+
return nil
57+
}
5558
cacheKey, err := computeCacheKey(pluginsState, msg)
5659
if err != nil {
5760
return err

0 commit comments

Comments
 (0)