mirror of
https://github.com/joohoi/acme-dns.git
synced 2024-12-22 21:33:51 +07:00
Merge branch 'master' into cpu-differentiate-errors
This commit is contained in:
commit
92f8cc2802
6
dns.go
6
dns.go
@ -52,7 +52,11 @@ func answer(q dns.Question) ([]dns.RR, int, error) {
|
||||
var rtype = q.Qtype
|
||||
r, ok := RR.Records[rtype][domain]
|
||||
if !ok {
|
||||
rcode = dns.RcodeNameError
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user