mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -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 {
|
if !ok {
|
||||||
return nil, fmt.Errorf("no full server is running")
|
return nil, fmt.Errorf("no full server is running")
|
||||||
}
|
}
|
||||||
|
req := state.NewWithQuestion(name, typ)
|
||||||
size := state.Size()
|
|
||||||
do := state.Do()
|
|
||||||
req := new(dns.Msg)
|
|
||||||
req.SetQuestion(name, typ)
|
|
||||||
req.SetEdns0(uint16(size), do)
|
|
||||||
|
|
||||||
nw := nonwriter.New(state.W)
|
nw := nonwriter.New(state.W)
|
||||||
server.ServeDNS(ctx, nw, req)
|
server.ServeDNS(ctx, nw, req.Req)
|
||||||
|
|
||||||
return nw.Msg, nil
|
return nw.Msg, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user