mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
fix NXDOMAIN/NODATA fallthough case (#3118)
This commit is contained in:
committed by
Miek Gieben
parent
555e4877ae
commit
a64ff8cc0a
@@ -349,6 +349,30 @@ 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: "testns.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"),
|
||||
},
|
||||
},
|
||||
// NS query for qname != zone (non existing domain)
|
||||
{
|
||||
Qname: "foo.cluster.local.", Qtype: dns.TypeNS,
|
||||
Rcode: dns.RcodeNameError,
|
||||
Ns: []dns.RR{
|
||||
test.SOA("cluster.local. 5 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1499347823 7200 1800 86400 5"),
|
||||
},
|
||||
},
|
||||
// NS query for qname != zone (non existing domain)
|
||||
{
|
||||
Qname: "foo.svc.cluster.local.", Qtype: dns.TypeNS,
|
||||
Rcode: dns.RcodeNameError,
|
||||
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