diff options
Diffstat (limited to 'plugin/auto/auto.go')
-rw-r--r-- | plugin/auto/auto.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugin/auto/auto.go b/plugin/auto/auto.go index ec60bf23a..6330621be 100644 --- a/plugin/auto/auto.go +++ b/plugin/auto/auto.go @@ -62,6 +62,11 @@ func (a Auto) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i return dns.RcodeServerFailure, nil } + // If transfer is not loaded, we'll see these, answer with refused (no transfer allowed). + if state.QType() == dns.TypeAXFR || state.QType() == dns.TypeIXFR { + return dns.RcodeRefused, nil + } + answer, ns, extra, result := z.Lookup(ctx, state, qname) m := new(dns.Msg) |