Skip to content
Snippets Groups Projects
Unverified Commit 92f8cc28 authored by Joona Hoikkala's avatar Joona Hoikkala Committed by GitHub
Browse files

Merge branch 'master' into cpu-differentiate-errors

parents f463d07d 978ac5d6
No related branches found
No related tags found
No related merge requests found
......@@ -51,9 +51,13 @@ func answer(q dns.Question) ([]dns.RR, int, error) {
var domain = strings.ToLower(q.Name)
var rtype = q.Qtype
r, ok := RR.Records[rtype][domain]
if !ok {
r, ok = RR.Records[dns.TypeCNAME][domain]
if !ok {
rcode = dns.RcodeNameError
}
}
log.WithFields(log.Fields{"qtype": dns.TypeToString[rtype], "domain": domain, "rcode": dns.RcodeToString[rcode]}).Debug("Answering question for domain")
return r, rcode, nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment