Commit 9026a4a2 authored by Ondřej Benkovský's avatar Ondřej Benkovský Committed by GitHub

upstream lookups are done with original EDNS options (#4826)

* upstream lookups are done with original EDNS options
Signed-off-by: default avatarOndřej Benkovský <ondrej.benkovsky@jamf.com>

* fixup! upstream lookups are done with original EDNS options
Signed-off-by: default avatarOndřej Benkovský <ondrej.benkovsky@jamf.com>
parent 44c82602
......@@ -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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment