k8s/autopath: Add CNAMES (#771)

* Add unit tests & cnames

* more progress

* fix

* next mw dependent unit tests

* add tests for OnNXDOMAIN

* Add AAAA and ndots unit tests; fix request.NewWithQuestion

* Correct default value in README

* add CNAMEs to readme

* review

* fix autopath examples

* fix and test CNAME response order
This commit is contained in:
Chris O'Haver
2017-07-11 18:05:32 -04:00
committed by John Belamaric
parent 0049230a93
commit 8495e48297
7 changed files with 586 additions and 28 deletions

View File

@@ -29,7 +29,7 @@ type Request struct {
// section in the request.
func (r *Request) NewWithQuestion(name string, typ uint16) Request {
req1 := Request{W: r.W, Req: r.Req.Copy()}
req1.Req.Question[0] = dns.Question{Name: dns.Fqdn(name), Qtype: dns.ClassINET, Qclass: typ}
req1.Req.Question[0] = dns.Question{Name: dns.Fqdn(name), Qclass: dns.ClassINET, Qtype: typ}
return req1
}