diff options
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/forward/forward.go | 3 | ||||
-rw-r--r-- | plugin/grpc/grpc.go | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/plugin/forward/forward.go b/plugin/forward/forward.go index c7f7a83c4..da2e175fe 100644 --- a/plugin/forward/forward.go +++ b/plugin/forward/forward.go @@ -146,7 +146,8 @@ func (f *Forward) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg if !state.Match(ret) { debug.Hexdumpf(ret, "Wrong reply for id: %d, %s %d", ret.Id, state.QName(), state.QType()) - formerr := state.ErrorMessage(dns.RcodeFormatError) + formerr := new(dns.Msg) + formerr.SetRcode(state.Req, dns.RcodeFormatError) w.WriteMsg(formerr) return 0, taperr } diff --git a/plugin/grpc/grpc.go b/plugin/grpc/grpc.go index 655be00c1..3dda225df 100644 --- a/plugin/grpc/grpc.go +++ b/plugin/grpc/grpc.go @@ -77,7 +77,8 @@ func (g *GRPC) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) ( if !state.Match(ret) { debug.Hexdumpf(ret, "Wrong reply for id: %d, %s %d", ret.Id, state.QName(), state.QType()) - formerr := state.ErrorMessage(dns.RcodeFormatError) + formerr := new(dns.Msg) + formerr.SetRcode(state.Req, dns.RcodeFormatError) w.WriteMsg(formerr) return 0, nil } |