mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-28 09:32:55 +08:00
DS: More cleanups
This commit is contained in:
parent
a89ab89ab6
commit
c0354a585d
3 changed files with 25 additions and 5 deletions
|
@ -813,6 +813,24 @@
|
|||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td class="success">
|
||||
<i class="fa fa-check text-success" aria-hidden="true"></i>
|
||||
</td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
<td><i class="fa fa-minus dim"></i></td>
|
||||
</tr>
|
||||
|
|
|
@ -373,11 +373,11 @@ func naptr(name string, order uint16, preference uint16, flags string, service s
|
|||
return r
|
||||
}
|
||||
|
||||
func ds(name string, keyTag uint16, algorithm, digestType uint8, digest string) *rec {
|
||||
func ds(name string, keytag uint16, algorithm, digesttype uint8, digest string) *rec {
|
||||
r := makeRec(name, "", "DS")
|
||||
r.DsKeyTag = keyTag
|
||||
r.DsKeyTag = keytag
|
||||
r.DsAlgorithm = algorithm
|
||||
r.DsDigestType = digestType
|
||||
r.DsDigestType = digesttype
|
||||
r.DsDigest = digest
|
||||
return r
|
||||
}
|
||||
|
|
|
@ -169,6 +169,8 @@ func checkTargets(rec *models.RecordConfig, domain string) (errs []error) {
|
|||
if label == "@" {
|
||||
check(fmt.Errorf("cannot create CNAME record for bare domain"))
|
||||
}
|
||||
case "DS":
|
||||
check(checkTarget(target))
|
||||
case "MX":
|
||||
check(checkTarget(target))
|
||||
case "NS":
|
||||
|
@ -186,7 +188,7 @@ func checkTargets(rec *models.RecordConfig, domain string) (errs []error) {
|
|||
check(checkTarget(target))
|
||||
case "SRV":
|
||||
check(checkTarget(target))
|
||||
case "TXT", "IMPORT_TRANSFORM", "CAA", "SSHFP", "TLSA", "DS":
|
||||
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
|
||||
|
@ -316,7 +318,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 == "DS" || 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
|
||||
|
|
Loading…
Reference in a new issue