aboutsummaryrefslogtreecommitdiff
path: root/plugin/dnstap/writer.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/dnstap/writer.go')
-rw-r--r--plugin/dnstap/writer.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/dnstap/writer.go b/plugin/dnstap/writer.go
index 177263496..afd19ea5c 100644
--- a/plugin/dnstap/writer.go
+++ b/plugin/dnstap/writer.go
@@ -1,9 +1,11 @@
package dnstap
import (
+ "context"
"time"
"github.com/coredns/coredns/plugin/dnstap/msg"
+ "github.com/coredns/coredns/request"
tap "github.com/dnstap/golang-dnstap"
"github.com/miekg/dns"
@@ -13,6 +15,7 @@ import (
type ResponseWriter struct {
queryTime time.Time
query *dns.Msg
+ ctx context.Context
dns.ResponseWriter
Dnstap
}
@@ -35,6 +38,7 @@ func (w *ResponseWriter) WriteMsg(resp *dns.Msg) error {
}
msg.SetType(r, tap.Message_CLIENT_RESPONSE)
- w.TapMessage(r)
+ state := request.Request{W: w.ResponseWriter, Req: w.query}
+ w.TapMessageWithMetadata(w.ctx, r, state)
return nil
}