Up to DNS version 1.1.0 (#2346)

Upgrade to new dns lib version; that saw multiple improvements; some
patch releases are in the pipeline.

The big thing here is the removal of ErrTruncated, so we need to deal
with this slightly different in the forward plugin. It removed the
entire truncated.go logic and just checks the message for .Truncated (if
there is a message) and retries with tcp.

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2018-11-29 20:02:32 +00:00
committed by GitHub
parent 39ad7e499e
commit 50ef7409d1
4 changed files with 2 additions and 33 deletions

View File

@@ -116,7 +116,7 @@ func (f *Forward) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
continue
}
// Retry with TCP if truncated and prefer_udp configured.
if err == dns.ErrTruncated && !opts.forceTCP && f.opts.preferUDP {
if ret != nil && ret.Truncated && !opts.forceTCP && f.opts.preferUDP {
opts.forceTCP = true
continue
}
@@ -127,7 +127,6 @@ func (f *Forward) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
child.Finish()
}
ret, err = truncated(state, ret, err)
upstreamErr = err
if err != nil {