diff options
author | 2020-10-01 21:25:19 +0800 | |
---|---|---|
committer | 2020-10-01 15:25:19 +0200 | |
commit | a0f712086486de3c0950b99130d87f60f5166cd9 (patch) | |
tree | d159cbbd4ff697a23f713f8843f11c81a20c934d /plugin | |
parent | 275a62c70a630f678a97f69abbc813fb90a1a310 (diff) | |
download | coredns-a0f712086486de3c0950b99130d87f60f5166cd9.tar.gz coredns-a0f712086486de3c0950b99130d87f60f5166cd9.tar.zst coredns-a0f712086486de3c0950b99130d87f60f5166cd9.zip |
plugins/auto: allow fallthrough if no zone match (#4166)
* plugins/auto: allow fallthrough if no zone match
this is a solution to #3033
Signed-off-by: Macks <macksme@outlook.com>
* plugin/auto.go remove whitespace
Signed-off-by: Macks <macksme@outlook.com>
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/auto/auto.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/auto/auto.go b/plugin/auto/auto.go index 4316d8d2f..ec60bf23a 100644 --- a/plugin/auto/auto.go +++ b/plugin/auto/auto.go @@ -50,6 +50,9 @@ func (a Auto) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i // Now the real zone. zone = plugin.Zones(a.Zones.Names()).Matches(qname) + if zone == "" { + return plugin.NextOrFailure(a.Name(), a.Next, ctx, w, r) + } a.Zones.RLock() z, ok := a.Zones.Z[zone] |