aboutsummaryrefslogtreecommitdiff
path: root/plugin/grpc/grpc.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2019-03-24 13:26:15 +0000
committerGravatar GitHub <noreply@github.com> 2019-03-24 13:26:15 +0000
commitf08f7e24d6a1ad9d41277e3dcf2d57edb7b9e00f (patch)
treef93376af9c52702030d87d280bb4cee88c6c498d /plugin/grpc/grpc.go
parent1e281ad8f0f73bfa68d022e53309cde5ca0840e6 (diff)
downloadcoredns-f08f7e24d6a1ad9d41277e3dcf2d57edb7b9e00f.tar.gz
coredns-f08f7e24d6a1ad9d41277e3dcf2d57edb7b9e00f.tar.zst
coredns-f08f7e24d6a1ad9d41277e3dcf2d57edb7b9e00f.zip
request.Request: remove useless function (#2714)
ErrorMessage was a very shallow function that didn't add anything. Remove it and remove its usage. Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/grpc/grpc.go')
-rw-r--r--plugin/grpc/grpc.go3
1 files changed, 2 insertions, 1 deletions
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
}