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

@@ -383,7 +383,7 @@ Redo:
func (z *Zone) doLookup(ctx context.Context, state request.Request, target string, qtype uint16) ([]dns.RR, Result) {
m, e := z.Upstream.Lookup(ctx, state, target, qtype)
if e != nil {
return nil, Success
return nil, ServerFailure
}
if m == nil {
return nil, Success