aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2020-08-13 18:26:30 +0200
committerGravatar GitHub <noreply@github.com> 2020-08-13 09:26:30 -0700
commit9230e1772bc24faddd94a3dc9be7fe52a4d29e83 (patch)
treed2fbd4c037c14a4d3f18fe2e75eac483da75e39e /plugin
parent1efd7e369411db6f5a52fcb75b12f41b83f41433 (diff)
downloadcoredns-9230e1772bc24faddd94a3dc9be7fe52a4d29e83.tar.gz
coredns-9230e1772bc24faddd94a3dc9be7fe52a4d29e83.tar.zst
coredns-9230e1772bc24faddd94a3dc9be7fe52a4d29e83.zip
pkg/upstream: set edns0 and Do when required (#4055)
Set these options of the requests warrents them. Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin')
-rw-r--r--plugin/pkg/upstream/upstream.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/pkg/upstream/upstream.go b/plugin/pkg/upstream/upstream.go
index 894488ffd..eacb9b4d5 100644
--- a/plugin/pkg/upstream/upstream.go
+++ b/plugin/pkg/upstream/upstream.go
@@ -25,8 +25,11 @@ func (u *Upstream) Lookup(ctx context.Context, state request.Request, name strin
return nil, fmt.Errorf("no full server is running")
}
+ size := state.Size()
+ do := state.Do()
req := new(dns.Msg)
req.SetQuestion(name, typ)
+ req.SetEdns0(uint16(size), do)
nw := nonwriter.New(state.W)