mirror of
https://github.com/coredns/coredns.git
synced 2025-11-21 19:32:21 -05:00
Issue 388 (#389)
* add extra test * middleware/auto: fix crash when calling empty handler Don't call the next middleware, we should be auth. for this zone getitng into this path we should respond with ServFail. Fixes #388
This commit is contained in:
@@ -64,10 +64,7 @@ func (a Auto) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i
|
||||
z, ok := a.Zones.Z[zone]
|
||||
a.Zones.RUnlock()
|
||||
|
||||
if !ok {
|
||||
return a.Next.ServeDNS(ctx, w, r)
|
||||
}
|
||||
if z == nil {
|
||||
if !ok || z == nil {
|
||||
return dns.RcodeServerFailure, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user