Commit a0f71208 authored by Macks's avatar Macks Committed by GitHub

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: default avatarMacks <macksme@outlook.com>

* plugin/auto.go remove whitespace
Signed-off-by: default avatarMacks <macksme@outlook.com>
parent 275a62c7
...@@ -50,6 +50,9 @@ func (a Auto) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i ...@@ -50,6 +50,9 @@ func (a Auto) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i
// Now the real zone. // Now the real zone.
zone = plugin.Zones(a.Zones.Names()).Matches(qname) zone = plugin.Zones(a.Zones.Names()).Matches(qname)
if zone == "" {
return plugin.NextOrFailure(a.Name(), a.Next, ctx, w, r)
}
a.Zones.RLock() a.Zones.RLock()
z, ok := a.Zones.Z[zone] z, ok := a.Zones.Z[zone]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment