diff --git a/middleware/etcd/README.md b/middleware/etcd/README.md index 9542dea6b..b2f4a05d0 100644 --- a/middleware/etcd/README.md +++ b/middleware/etcd/README.md @@ -23,7 +23,6 @@ If you want to `round robin` A and AAAA responses look at the `loadbalance` midd ~~~ etcd [ZONES...] { stubzones - fallthrough path PATH endpoint ENDPOINT... upstream ADDRESS... @@ -34,7 +33,6 @@ etcd [ZONES...] { * `stubzones` enables the stub zones feature. The stubzone is *only* done in the etcd tree located under the *first* zone specified. -* `fallthrough` If zone matches but no record can be generated, pass request to the next middleware. * **PATH** the path inside etcd. Defaults to "/skydns". * **ENDPOINT** the etcd endpoints. Defaults to "http://localhost:2397". * `upstream` upstream resolvers to be used resolve external names found in etcd (think CNAMEs) diff --git a/middleware/etcd/etcd.go b/middleware/etcd/etcd.go index 42334fac7..4ef95ee04 100644 --- a/middleware/etcd/etcd.go +++ b/middleware/etcd/etcd.go @@ -21,16 +21,15 @@ import ( // Etcd is a middleware talks to an etcd cluster. type Etcd struct { - Next middleware.Handler - Fallthrough bool - Zones []string - PathPrefix string - Proxy proxy.Proxy // Proxy for looking up names during the resolution process - Client etcdc.KeysAPI - Ctx context.Context - Inflight *singleflight.Group - Stubmap *map[string]proxy.Proxy // list of proxies for stub resolving. - Debugging bool // Do we allow debug queries. + Next middleware.Handler + Zones []string + PathPrefix string + Proxy proxy.Proxy // Proxy for looking up names during the resolution process + Client etcdc.KeysAPI + Ctx context.Context + Inflight *singleflight.Group + Stubmap *map[string]proxy.Proxy // list of proxies for stub resolving. + Debugging bool // Do we allow debug queries. endpoints []string // Stored here as well, to aid in testing. } diff --git a/middleware/etcd/handler.go b/middleware/etcd/handler.go index 2de6fb629..271a6d938 100644 --- a/middleware/etcd/handler.go +++ b/middleware/etcd/handler.go @@ -42,10 +42,7 @@ func (e *Etcd) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) ( if opt.Debug != "" { r.Question[0].Name = opt.Debug } - if e.Fallthrough { - return middleware.NextOrFailure(e.Name(), e.Next, ctx, w, r) - } - return dns.RcodeServerFailure, nil + return middleware.NextOrFailure(e.Name(), e.Next, ctx, w, r) } var ( diff --git a/middleware/etcd/multi_test.go b/middleware/etcd/multi_test.go index 301b2c49e..64c5ad55d 100644 --- a/middleware/etcd/multi_test.go +++ b/middleware/etcd/multi_test.go @@ -15,7 +15,6 @@ import ( func TestMultiLookup(t *testing.T) { etc := newEtcdMiddleware() etc.Zones = []string{"skydns.test.", "miek.nl."} - etc.Fallthrough = true etc.Next = test.ErrorHandler() for _, serv := range servicesMulti { diff --git a/middleware/etcd/setup.go b/middleware/etcd/setup.go index ee5a93fff..331227c34 100644 --- a/middleware/etcd/setup.go +++ b/middleware/etcd/setup.go @@ -74,8 +74,6 @@ func etcdParse(c *caddy.Controller) (*Etcd, bool, error) { switch c.Val() { case "stubzones": stubzones = true - case "fallthrough": - etc.Fallthrough = true case "debug": etc.Debugging = true case "path":