mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04: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:
@@ -43,11 +43,9 @@ func (f File) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i
|
||||
}
|
||||
return dns.RcodeServerFailure, errors.New("no next middleware found")
|
||||
}
|
||||
|
||||
z, ok := f.Zones.Z[zone]
|
||||
if !ok {
|
||||
return f.Next.ServeDNS(ctx, w, r)
|
||||
}
|
||||
if z == nil {
|
||||
if !ok || z == nil {
|
||||
return dns.RcodeServerFailure, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user