From 1da96807ec2f3c8023a638c56ee8d42aaabbdaec Mon Sep 17 00:00:00 2001 From: Andy Bursavich Date: Sat, 15 Feb 2020 13:11:19 -0800 Subject: [PATCH] plugin/template: fix panic when missing next handler (#3672) Signed-off-by: Andy Bursavich --- plugin/template/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/template/template.go b/plugin/template/template.go index f2a7b186f..4940dc9f4 100644 --- a/plugin/template/template.go +++ b/plugin/template/template.go @@ -122,7 +122,7 @@ func (h Handler) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) return template.rcode, nil } - return h.Next.ServeDNS(ctx, w, r) + return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r) } // Name implements the plugin.Handler interface.