plugin/file/auto: Write CNAME answer to client even if target lookup is SERVFAIL (#4863)

* write cname answer to client even if target lookup is servfail

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* fix existing unit test expectations

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
Chris O'Haver
2021-09-14 04:08:22 -04:00
committed by GitHub
parent 8f7162c42b
commit 158ad2d738
5 changed files with 35 additions and 4 deletions

View File

@@ -77,10 +77,17 @@ func TestFileUpstreamError(t *testing.T) {
},
"srvfail": {
Qname: "srvfail.example.org.", Qtype: dns.TypeA,
Answer: []dns.RR{
test.CNAME("srvfail.example.org. 3600 IN CNAME srvfail.example.net."),
},
Rcode: dns.RcodeServerFailure,
},
"srvfail-chain": {
Qname: "chain2.example.org.", Qtype: dns.TypeA,
Answer: []dns.RR{
test.CNAME("chain2.example.org. 3600 IN CNAME srvfail.example.org."),
test.CNAME("srvfail.example.org. 3600 IN CNAME srvfail.example.net."),
},
Rcode: dns.RcodeServerFailure,
},
"nodata": {