mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user