aboutsummaryrefslogtreecommitdiff
path: root/plugin/file/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/file/file.go')
-rw-r--r--plugin/file/file.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugin/file/file.go b/plugin/file/file.go
index 1c586dd6d..0834ddc4d 100644
--- a/plugin/file/file.go
+++ b/plugin/file/file.go
@@ -47,6 +47,11 @@ func (f File) 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
+ }
+
// This is only for when we are a secondary zones.
if r.Opcode == dns.OpcodeNotify {
if z.isNotify(state) {