aboutsummaryrefslogtreecommitdiff
path: root/plugin/forward/dnstap.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/forward/dnstap.go')
-rw-r--r--plugin/forward/dnstap.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugin/forward/dnstap.go b/plugin/forward/dnstap.go
index edbee8715..e9962d268 100644
--- a/plugin/forward/dnstap.go
+++ b/plugin/forward/dnstap.go
@@ -6,6 +6,7 @@ import (
"time"
"github.com/coredns/coredns/plugin/dnstap/msg"
+ "github.com/coredns/coredns/plugin/pkg/proxy"
"github.com/coredns/coredns/request"
tap "github.com/dnstap/golang-dnstap"
@@ -13,7 +14,7 @@ import (
)
// toDnstap will send the forward and received message to the dnstap plugin.
-func toDnstap(f *Forward, host string, state request.Request, opts options, reply *dns.Msg, start time.Time) {
+func toDnstap(f *Forward, host string, state request.Request, opts proxy.Options, reply *dns.Msg, start time.Time) {
h, p, _ := net.SplitHostPort(host) // this is preparsed and can't err here
port, _ := strconv.ParseUint(p, 10, 32) // same here
ip := net.ParseIP(h)
@@ -21,9 +22,9 @@ func toDnstap(f *Forward, host string, state request.Request, opts options, repl
var ta net.Addr = &net.UDPAddr{IP: ip, Port: int(port)}
t := state.Proto()
switch {
- case opts.forceTCP:
+ case opts.ForceTCP:
t = "tcp"
- case opts.preferUDP:
+ case opts.PreferUDP:
t = "udp"
}