aboutsummaryrefslogtreecommitdiff
path: root/plugin/cache/handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/cache/handler.go')
-rw-r--r--plugin/cache/handler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/cache/handler.go b/plugin/cache/handler.go
index f079e6c51..987dd61b2 100644
--- a/plugin/cache/handler.go
+++ b/plugin/cache/handler.go
@@ -41,7 +41,7 @@ func (c *Cache) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
if !do {
setDo(r)
}
- crr := &ResponseWriter{ResponseWriter: w, Cache: c, state: state, server: server}
+ crr := &ResponseWriter{ResponseWriter: w, Cache: c, state: state, server: server, do: do}
return plugin.NextOrFailure(c.Name(), c.Next, ctx, crr, r)
}
if ttl < 0 {
@@ -53,7 +53,7 @@ func (c *Cache) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
if !do {
setDo(r)
}
- crr := &ResponseWriter{Cache: c, state: state, server: server, prefetch: true, remoteAddr: w.LocalAddr()}
+ crr := &ResponseWriter{Cache: c, state: state, server: server, prefetch: true, remoteAddr: w.LocalAddr(), do: do}
plugin.NextOrFailure(c.Name(), c.Next, ctx, crr, r)
}()
}