mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
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:
committed by
Miek Gieben
parent
6a6e9a9b33
commit
3a59c833a0
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user