From bb278caf9222026ae26869c24ebff9bd5c7af7ef Mon Sep 17 00:00:00 2001 From: Peter Dunaskin Date: Mon, 1 Apr 2019 09:15:43 +0200 Subject: [PATCH] Set NAPTR record to FQDN. --- pkg/normalize/validate.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/normalize/validate.go b/pkg/normalize/validate.go index 52e2fc34a..21e5c0efd 100644 --- a/pkg/normalize/validate.go +++ b/pkg/normalize/validate.go @@ -171,11 +171,13 @@ func checkTargets(rec *models.RecordConfig, domain string) (errs []error) { } case "PTR": check(checkTarget(target)) + case "NAPTR": + check(checkTarget(target)) case "ALIAS": check(checkTarget(target)) case "SRV": check(checkTarget(target)) - case "TXT", "IMPORT_TRANSFORM", "CAA", "NAPTR", "SSHFP", "TLSA": + case "TXT", "IMPORT_TRANSFORM", "CAA", "SSHFP", "TLSA": default: if rec.Metadata["orig_custom_type"] != "" { // it is a valid custom type. We perform no validation on target @@ -232,7 +234,7 @@ func importTransform(srcDomain, dstDomain *models.DomainConfig, transforms []tra r := newRec() r.SetTarget(transformCNAME(r.GetTargetField(), srcDomain.Name, dstDomain.Name)) dstDomain.Records = append(dstDomain.Records, r) - case "MX", "NS", "SRV", "TXT", "CAA", "TLSA": + case "MX", "NAPTR", "NS", "SRV", "TXT", "CAA", "TLSA": // Not imported. continue default: @@ -300,7 +302,7 @@ func NormalizeAndValidateConfig(config *models.DNSConfig) (errs []error) { } // Canonicalize Targets. - if rec.Type == "CNAME" || rec.Type == "MX" || rec.Type == "NS" || rec.Type == "SRV" { + if rec.Type == "CNAME" || rec.Type == "MX" || rec.Type == "NAPTR" || 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