diff options
Diffstat (limited to 'plugin/dnstap/setup.go')
-rw-r--r-- | plugin/dnstap/setup.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugin/dnstap/setup.go b/plugin/dnstap/setup.go index ab5488686..a863639ad 100644 --- a/plugin/dnstap/setup.go +++ b/plugin/dnstap/setup.go @@ -13,8 +13,8 @@ import ( func init() { plugin.Register("dnstap", setup) } type config struct { + proto string target string - socket bool full bool } @@ -32,10 +32,10 @@ func parseConfig(d *caddy.Controller) (c config, err error) { return c, d.ArgErr() } c.target = servers[0] + c.proto = "tcp" } else { - // default to UNIX socket c.target = strings.TrimPrefix(c.target, "unix://") - c.socket = true + c.proto = "unix" } c.full = d.NextArg() && d.Val() == "full" @@ -49,7 +49,7 @@ func setup(c *caddy.Controller) error { return plugin.Error("dnstap", err) } - dio := dnstapio.New(conf.target, conf.socket) + dio := dnstapio.New(conf.proto, conf.target) dnstap := Dnstap{io: dio, IncludeRawMessage: conf.full} c.OnStartup(func() error { |