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>
This commit is contained in:
Macks 2020-10-01 21:25:19 +08:00 committed by GitHub
parent 275a62c70a
commit a0f7120864
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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]