Merge pull request #136 from xi2/fix-handling-of-cnames

DNS Challenge: Fix handling of CNAMEs
This commit is contained in:
xenolf 2016-02-20 01:24:12 +01:00
commit 7dcfb4a92b

View file

@ -82,10 +82,7 @@ func checkDNSPropagation(fqdn, value string) (bool, error) {
if err != nil {
return false, err
}
if r.Rcode != dns.RcodeSuccess {
return false, fmt.Errorf("Could not resolve %s -> %s", fqdn, dns.RcodeToString[r.Rcode])
}
if r.Rcode == dns.RcodeSuccess {
// If we see a CNAME here then use the alias
for _, rr := range r.Answer {
if cn, ok := rr.(*dns.CNAME); ok {
@ -95,6 +92,7 @@ func checkDNSPropagation(fqdn, value string) (bool, error) {
}
}
}
}
authoritativeNss, err := lookupNameservers(fqdn)
if err != nil {