plugin/kubernetes: Don't do a zone transfer for NS requests (#3098)
* fix switch order * remove fallthough * add test * fix test * distingush nxdomain/nodata for at least first subdomain of zone * restore fallthough; reorder switch cases
This commit is contained in:
parent
6a6e9a9b33
commit
3a59c833a0
2 changed files with 10 additions and 2 deletions
|
@ -341,6 +341,14 @@ var dnsTestCases = []test.Case{
|
|||
test.SOA("cluster.local. 5 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 5"),
|
||||
},
|
||||
},
|
||||
// NS query for qname != zone (existing domain)
|
||||
{
|
||||
Qname: "svc.cluster.local.", Qtype: dns.TypeNS,
|
||||
Rcode: dns.RcodeSuccess,
|
||||
Ns: []dns.RR{
|
||||
test.SOA("cluster.local. 5 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 5"),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func TestServeDNS(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue