mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 09:59:59 +08:00
NS1: Enable DS & DSForChildren support (#1446)
Enable support for DS and DSForChildren sets of records in NS1. Fixes #1445
This commit is contained in:
parent
b8a70d7556
commit
e300a8e9ca
1 changed files with 8 additions and 0 deletions
|
@ -20,6 +20,8 @@ var docNotes = providers.DocumentationNotes{
|
|||
providers.CanGetZones: providers.Can(),
|
||||
providers.CanUseAlias: providers.Can(),
|
||||
providers.CanUseCAA: providers.Can(),
|
||||
providers.CanUseDS: providers.Can(),
|
||||
providers.CanUseDSForChildren: providers.Can(),
|
||||
providers.CanUseNAPTR: providers.Can(),
|
||||
providers.CanUsePTR: providers.Can(),
|
||||
providers.DocCreateDomains: providers.Can(),
|
||||
|
@ -188,6 +190,12 @@ func buildRecord(recs models.Records, domain string, id string) *dns.Record {
|
|||
r.NaptrService,
|
||||
r.NaptrRegexp,
|
||||
r.GetTargetField()}})
|
||||
} else if r.Type == "DS" {
|
||||
rec.AddAnswer(&dns.Answer{Rdata: []string{
|
||||
strconv.Itoa(int(r.DsKeyTag)),
|
||||
strconv.Itoa(int(r.DsAlgorithm)),
|
||||
strconv.Itoa(int(r.DsDigestType)),
|
||||
r.DsDigest}})
|
||||
} else {
|
||||
rec.AddAnswer(&dns.Answer{Rdata: strings.Split(r.GetTargetField(), " ")})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue