mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
Add state.SizeAndDo()
This methods returns an OPT record which can be used to create a new message with the same bufsize and Do bit as the original one.
This commit is contained in:
@@ -55,8 +55,10 @@ func New(hosts []string) Proxy {
|
||||
func (p Proxy) Lookup(state middleware.State, name string, tpe uint16) (*dns.Msg, error) {
|
||||
req := new(dns.Msg)
|
||||
req.SetQuestion(name, tpe)
|
||||
// TODO(miek):
|
||||
// USE STATE FOR DNSSEC ETCD BUFSIZE BLA BLA
|
||||
|
||||
opt := state.SizeAndDo()
|
||||
req.Extra = []dns.RR{opt}
|
||||
|
||||
return p.lookup(state, req)
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ type ReverseProxy struct {
|
||||
}
|
||||
|
||||
func (p ReverseProxy) ServeDNS(w dns.ResponseWriter, r *dns.Msg, extra []dns.RR) error {
|
||||
// TODO(miek): use extra to EDNS0.
|
||||
var (
|
||||
reply *dns.Msg
|
||||
err error
|
||||
|
||||
Reference in New Issue
Block a user