From a0f712086486de3c0950b99130d87f60f5166cd9 Mon Sep 17 00:00:00 2001 From: Macks Date: Thu, 1 Oct 2020 21:25:19 +0800 Subject: [PATCH] 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 * plugin/auto.go remove whitespace Signed-off-by: Macks --- plugin/auto/auto.go | 3 +++ 1 file changed, 3 insertions(+) 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]