mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
plugin/file: add a test case for wildcard RRs do not apply (#5078)
From RFC 1034 ... Wildcard RRs do not apply: [...] When the query name or a name between the wildcard domain and the query name is know to exist. For example, if a wildcard RR has an owner name of "*.X", and the zone also contains RRs attached to B.X, the wildcards would apply to queries for name Z.X (presuming there is no explicit information for Z.X), but not to B.X, A.B.X, or X. Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
This commit is contained in:
@@ -102,6 +102,13 @@ var dnsTestCases = []test.Case{
|
|||||||
},
|
},
|
||||||
Ns: miekAuth,
|
Ns: miekAuth,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Qname: "a.b.x.miek.nl.", Qtype: dns.TypeCNAME,
|
||||||
|
Rcode: dns.RcodeNameError,
|
||||||
|
Ns: []dns.RR{
|
||||||
|
test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Qname: "asterisk.y.miek.nl.", Qtype: dns.TypeA,
|
Qname: "asterisk.y.miek.nl.", Qtype: dns.TypeA,
|
||||||
Answer: []dns.RR{
|
Answer: []dns.RR{
|
||||||
@@ -222,6 +229,7 @@ a IN A 139.162.196.78
|
|||||||
www IN CNAME a
|
www IN CNAME a
|
||||||
archive IN CNAME a
|
archive IN CNAME a
|
||||||
*.x IN CNAME www
|
*.x IN CNAME www
|
||||||
|
b.x IN CNAME a
|
||||||
*.y IN A 139.162.196.78
|
*.y IN A 139.162.196.78
|
||||||
dname IN DNAME x
|
dname IN DNAME x
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user