mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
Dont crash on tests with etcd running
This commit is contained in:
@@ -30,6 +30,9 @@ func (e Etcd) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (i
|
||||
|
||||
zone := middleware.Zones(e.Zones).Matches(state.Name())
|
||||
if zone == "" {
|
||||
if e.Next == nil {
|
||||
return dns.RcodeServerFailure, nil
|
||||
}
|
||||
return e.Next.ServeDNS(ctx, w, r)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user