diff options
author | 2018-07-07 10:14:21 +0300 | |
---|---|---|
committer | 2018-07-07 08:14:21 +0100 | |
commit | bc5090123487653ce502d5801007d03dbb6a2ba7 (patch) | |
tree | 942ec6a99c31c2c6b477f7027da108aeafc5c857 /plugin/forward/setup.go | |
parent | 7c41f2ce9f75a20d9bba3ab70b4cb8a133a0756f (diff) | |
download | coredns-bc5090123487653ce502d5801007d03dbb6a2ba7.tar.gz coredns-bc5090123487653ce502d5801007d03dbb6a2ba7.tar.zst coredns-bc5090123487653ce502d5801007d03dbb6a2ba7.zip |
plugin/forward: add prefer_udp option (#1944)
* plugin/forward: add prefer_udp option
* updated according to code review
- fixed linter warning
- removed metric parameter in Proxy.Connect()
Diffstat (limited to 'plugin/forward/setup.go')
-rw-r--r-- | plugin/forward/setup.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugin/forward/setup.go b/plugin/forward/setup.go index 7afafc8a7..152ba36c5 100644 --- a/plugin/forward/setup.go +++ b/plugin/forward/setup.go @@ -187,7 +187,12 @@ func parseBlock(c *caddy.Controller, f *Forward) error { if c.NextArg() { return c.ArgErr() } - f.forceTCP = true + f.opts.forceTCP = true + case "prefer_udp": + if c.NextArg() { + return c.ArgErr() + } + f.opts.preferUDP = true case "tls": args := c.RemainingArgs() if len(args) > 3 { |