Kubernetes cleanup6 (#887)

* mw/kubernetes: handle dns.TypeNS better.

* mw/kubernetes: cleanup typeNS replies a bit.
This commit is contained in:
Miek Gieben 2017-08-10 22:14:19 +01:00 committed by GitHub
parent ea77f2a2ca
commit a38a34c7e0
3 changed files with 8 additions and 27 deletions

View file

@ -25,7 +25,7 @@ func (k Kubernetes) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.M
// otherwise delegate to the next in the pipeline.
zone := middleware.Zones(k.Zones).Matches(state.Name())
if zone == "" {
if state.Type() != "PTR" {
if state.QType() != dns.TypePTR {
return middleware.NextOrFailure(k.Name(), k.Next, ctx, w, r)
}
// If this is a PTR request, and the request is in a defined