mirror of
https://github.com/coredns/coredns.git
synced 2025-12-06 10:25:10 -05:00
plugin/file: Fix in wrong answers returned when wildcard and concrete records exist (#4599)
* plugin/file: Fix in wrong answers returned when wildcard and concrete records exist Signed-off-by: Jason Du <xdu@infoblox.com> * Remove superfluous change Signed-off-by: Jason Du <xdu@infoblox.com> * Re-implementation and new test case If the domain's terminal is neither the matching wildcard, nor a domian directly under the wildcard, return NXDOMAIN Signed-off-by: Jason Du <xdu@infoblox.com> * Fix empty non-terminal & add test case Signed-off-by: Jason Du <xdu@infoblox.com> * Cleanup Signed-off-by: Jason Du <xdu@infoblox.com> * Fix case on domain name with character before * and add more test cases Signed-off-by: Jason Du <xdu@infoblox.com> * Use different IPs for records in cornerCasesWildcard zone file Signed-off-by: Jason Du <xdu@infoblox.com>
This commit is contained in:
@@ -95,6 +95,12 @@ var dnsTestCases = []test.Case{
|
||||
},
|
||||
Ns: miekAuth,
|
||||
},
|
||||
{
|
||||
Qname: "ent.miek.nl.", Qtype: dns.TypeA,
|
||||
Ns: []dns.RR{
|
||||
test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -193,4 +199,6 @@ www IN CNAME a
|
||||
archive IN CNAME a
|
||||
|
||||
srv IN SRV 10 10 8080 a.miek.nl.
|
||||
mx IN MX 10 a.miek.nl.`
|
||||
mx IN MX 10 a.miek.nl.
|
||||
|
||||
test.ent IN A 139.162.196.79`
|
||||
|
||||
Reference in New Issue
Block a user