Parse fix (#974)

* mw/kubernetes: add apex test

This adds small test case for apex queries: SOA and HINFO.

Fix (obvious) parse bug in parse.go.

* Test Ns request also here
This commit is contained in:
Miek Gieben 2017-08-23 14:07:10 +01:00 committed by GitHub
parent 61fc672e19
commit 4b105c761e
2 changed files with 71 additions and 0 deletions

View file

@ -50,6 +50,9 @@ func parseRequest(state request.Request) (r recordRequest, err error) {
// *_protocol._port
last := len(segs) - 1
if last < 0 {
return r, nil
}
r.podOrSvc = segs[last]
if r.podOrSvc != Pod && r.podOrSvc != Svc {
return r, errInvalidRequest