plugin/template: fix panic when missing next handler (#3672)

Signed-off-by: Andy Bursavich <abursavich@gmail.com>
This commit is contained in:
Andy Bursavich 2020-02-15 13:11:19 -08:00 committed by GitHub
parent e148948ca9
commit 1da96807ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.