1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Improve MSDNS naptr support (#1165)

* MSDNS: Improve reliability of zone dump

* Update tests

* MSDNS: Add initial NAPTR support

* Update

* fix tests

* fix tests

* Fixing integration tests for NAPTR

* Handle bad JSON. Handle NAPTR TTLs
This commit is contained in:
Tom Limoncelli
2021-06-24 18:26:21 -04:00
committed by GitHub
parent 6d64fc8cac
commit 654736be29
15 changed files with 305 additions and 36 deletions

View File

@@ -180,7 +180,9 @@ func checkTargets(rec *models.RecordConfig, domain string) (errs []error) {
case "PTR":
check(checkTarget(target))
case "NAPTR":
check(checkTarget(target))
if target != "" {
check(checkTarget(target))
}
case "ALIAS":
check(checkTarget(target))
case "SOA":
@@ -345,7 +347,7 @@ func ValidateAndNormalizeConfig(config *models.DNSConfig) (errs []error) {
}
// Canonicalize Targets.
if rec.Type == "CNAME" || rec.Type == "MX" || rec.Type == "NAPTR" || rec.Type == "NS" || rec.Type == "SRV" {
if rec.Type == "CNAME" || rec.Type == "MX" || rec.Type == "NS" || rec.Type == "SRV" {
// #rtype_variations
// These record types have a target that is a hostname.
// We normalize them to a FQDN so there is less variation to handle. If a