mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
upstream lookups are done with original EDNS options (#4826)
* upstream lookups are done with original EDNS options Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com> * fixup! upstream lookups are done with original EDNS options Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user