mirror of
https://github.com/coredns/coredns.git
synced 2025-12-04 09:25:13 -05:00
This reverts commit 68f1dd5ddf.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
"github.com/coredns/coredns/plugin/file"
|
||||
"github.com/coredns/coredns/plugin/metrics"
|
||||
"github.com/coredns/coredns/plugin/pkg/upstream"
|
||||
"github.com/coredns/coredns/plugin/transfer"
|
||||
"github.com/coredns/coredns/request"
|
||||
|
||||
"github.com/miekg/dns"
|
||||
@@ -22,8 +21,7 @@ type (
|
||||
Next plugin.Handler
|
||||
*Zones
|
||||
|
||||
metrics *metrics.Metrics
|
||||
transfer *transfer.Transfer
|
||||
metrics *metrics.Metrics
|
||||
loader
|
||||
}
|
||||
|
||||
@@ -32,6 +30,8 @@ type (
|
||||
template string
|
||||
re *regexp.Regexp
|
||||
|
||||
// In the future this should be something like ZoneMeta that contains all this stuff.
|
||||
transferTo []string
|
||||
ReloadInterval time.Duration
|
||||
upstream *upstream.Upstream // Upstream for looking up names during the resolution process.
|
||||
}
|
||||
@@ -59,6 +59,11 @@ func (a Auto) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i
|
||||
return dns.RcodeServerFailure, nil
|
||||
}
|
||||
|
||||
if state.QType() == dns.TypeAXFR || state.QType() == dns.TypeIXFR {
|
||||
xfr := file.Xfr{Zone: z}
|
||||
return xfr.ServeDNS(ctx, w, r)
|
||||
}
|
||||
|
||||
answer, ns, extra, result := z.Lookup(ctx, state, qname)
|
||||
|
||||
m := new(dns.Msg)
|
||||
|
||||
Reference in New Issue
Block a user