1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00
This commit is contained in:
Tom Limoncelli
2023-10-18 11:16:31 -04:00
parent 5c8d51e235
commit e89922d158
3 changed files with 2 additions and 7 deletions

View File

@ -351,11 +351,7 @@ func formatDsl(zonename string, rec *models.RecordConfig, defaultTTL uint32) str
case "TLSA":
target = fmt.Sprintf(`%d, %d, %d, "%s"`, rec.TlsaUsage, rec.TlsaSelector, rec.TlsaMatchingType, rec.GetTargetField())
case "TXT":
if len(rec.TxtStrings) == 1 {
target = `"` + rec.TxtStrings[0] + `"`
} else {
target = `["` + strings.Join(rec.TxtStrings, `", "`) + `"]`
}
target = jsonQuoted(rec.GetTargetField())
// TODO(tlim): If this is an SPF record, generate a SPF_BUILDER().
case "NS":
// NS records at the apex should be NAMESERVER() records.

View File

@ -672,7 +672,6 @@ func makeOvhNativeRecord(name, target, rType string) *models.RecordConfig {
r := makeRec(name, "", "TXT")
r.Metadata = make(map[string]string)
r.Metadata["create_ovh_native_record"] = rType
r.TxtStrings = []string{target}
r.SetTarget(target)
return r
}

View File

@ -86,7 +86,7 @@ func recordsToNative(rcs []*models.RecordConfig, expectedKey models.RecordKey) *
}
case "TXT": // Avoid double quoting for TXT records
rr = dnssdk.ResourceRecord{
Content: convertTxtSliceToSdkAnySlice(r.TxtStrings),
Content: convertTxtSliceToSdkAnySlice([]string{r.GetTargetField()}),
Meta: nil,
Enabled: true,
}