diff options
author | 2022-01-08 22:03:28 +0800 | |
---|---|---|
committer | 2022-01-08 06:03:28 -0800 | |
commit | 56ee0efa69b74aa0fba1292225f9086180e3e4c7 (patch) | |
tree | 8d471102ff260eabd5350c808730062063e85808 /plugin | |
parent | 37c0fcf4394a61098b4966f187525eea77e57704 (diff) | |
download | coredns-56ee0efa69b74aa0fba1292225f9086180e3e4c7.tar.gz coredns-56ee0efa69b74aa0fba1292225f9086180e3e4c7.tar.zst coredns-56ee0efa69b74aa0fba1292225f9086180e3e4c7.zip |
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>
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/file/lookup_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugin/file/lookup_test.go b/plugin/file/lookup_test.go index 2d81fbae6..5d024b88f 100644 --- a/plugin/file/lookup_test.go +++ b/plugin/file/lookup_test.go @@ -103,6 +103,13 @@ var dnsTestCases = []test.Case{ 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, Answer: []dns.RR{ test.A("asterisk.y.miek.nl. 1800 IN A 139.162.196.78"), @@ -222,6 +229,7 @@ a IN A 139.162.196.78 www IN CNAME a archive IN CNAME a *.x IN CNAME www +b.x IN CNAME a *.y IN A 139.162.196.78 dname IN DNAME x |