Skip to content

Commit

Permalink
Only check the authoritative NS when OverrideDomain is set
Browse files Browse the repository at this point in the history
and keep the old code path otherwise.
  • Loading branch information
crccw committed Mar 7, 2022
1 parent ba5037f commit 8e162d9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dnsutil.go
Expand Up @@ -214,11 +214,21 @@ func checkDNSPropagation(fqdn, value string, resolvers []string) (bool, error) {
fqdn += "."
}

// Initial attempt to resolve at the recursive NS
r, err := dnsQuery(fqdn, dns.TypeTXT, resolvers, true)
if err != nil {
return false, err
}

// TODO: make this configurable, maybe
// if !p.requireCompletePropagation {
// return true, nil
// }

if r.Rcode == dns.RcodeSuccess {
fqdn = updateDomainWithCName(r, fqdn)
}

authoritativeNss, err := lookupNameservers(fqdn, resolvers)
if err != nil {
return false, err
Expand Down

0 comments on commit 8e162d9

Please sign in to comment.