Only cache specific Rcodes

This commit is contained in:
Frank Denis 2018-01-22 11:19:57 +01:00
parent a9476fe04b
commit d7b8217018
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ func (plugin *PluginCacheResponse) Reload() error {
func (plugin *PluginCacheResponse) Eval(pluginsState *PluginsState, msg *dns.Msg) error {
plugin.cachedResponses = &cachedResponses
if msg.Rcode == dns.RcodeServerFailure {
if msg.Rcode != dns.RcodeSuccess && msg.Rcode != dns.RcodeNameError && msg.Rcode != dns.RcodeNotAuth {
return nil
}
cacheKey, err := computeCacheKey(pluginsState, msg)