mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Set NAPTR record to FQDN.
This commit is contained in:
@ -171,11 +171,13 @@ func checkTargets(rec *models.RecordConfig, domain string) (errs []error) {
|
|||||||
}
|
}
|
||||||
case "PTR":
|
case "PTR":
|
||||||
check(checkTarget(target))
|
check(checkTarget(target))
|
||||||
|
case "NAPTR":
|
||||||
|
check(checkTarget(target))
|
||||||
case "ALIAS":
|
case "ALIAS":
|
||||||
check(checkTarget(target))
|
check(checkTarget(target))
|
||||||
case "SRV":
|
case "SRV":
|
||||||
check(checkTarget(target))
|
check(checkTarget(target))
|
||||||
case "TXT", "IMPORT_TRANSFORM", "CAA", "NAPTR", "SSHFP", "TLSA":
|
case "TXT", "IMPORT_TRANSFORM", "CAA", "SSHFP", "TLSA":
|
||||||
default:
|
default:
|
||||||
if rec.Metadata["orig_custom_type"] != "" {
|
if rec.Metadata["orig_custom_type"] != "" {
|
||||||
// it is a valid custom type. We perform no validation on target
|
// 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 := newRec()
|
||||||
r.SetTarget(transformCNAME(r.GetTargetField(), srcDomain.Name, dstDomain.Name))
|
r.SetTarget(transformCNAME(r.GetTargetField(), srcDomain.Name, dstDomain.Name))
|
||||||
dstDomain.Records = append(dstDomain.Records, r)
|
dstDomain.Records = append(dstDomain.Records, r)
|
||||||
case "MX", "NS", "SRV", "TXT", "CAA", "TLSA":
|
case "MX", "NAPTR", "NS", "SRV", "TXT", "CAA", "TLSA":
|
||||||
// Not imported.
|
// Not imported.
|
||||||
continue
|
continue
|
||||||
default:
|
default:
|
||||||
@ -300,7 +302,7 @@ func NormalizeAndValidateConfig(config *models.DNSConfig) (errs []error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Canonicalize Targets.
|
// 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
|
// #rtype_variations
|
||||||
// These record types have a target that is a hostname.
|
// 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
|
// We normalize them to a FQDN so there is less variation to handle. If a
|
||||||
|
Reference in New Issue
Block a user