aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/pkg/upstream/upstream.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/plugin/pkg/upstream/upstream.go b/plugin/pkg/upstream/upstream.go
index 9c2973e41..f789d6692 100644
--- a/plugin/pkg/upstream/upstream.go
+++ b/plugin/pkg/upstream/upstream.go
@@ -24,15 +24,10 @@ func (u *Upstream) Lookup(ctx context.Context, state request.Request, name strin
if !ok {
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)
+ req := state.NewWithQuestion(name, typ)
nw := nonwriter.New(state.W)
- server.ServeDNS(ctx, nw, req)
+ server.ServeDNS(ctx, nw, req.Req)
return nw.Msg, nil
}