mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-11-09 16:00:36 +08:00
ns1: ignore DNSKEY & RRSIG entries (#1443)
These entries are autoconfigured by NS1 when a zone is enabled for DNSSEC and can't be modified via the API, producing a 405 API error on modification attempts. While unmodifiable, these records are returned by the API, so we have to ignore them. Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
parent
cc6f5eb8d4
commit
b8a70d7556
1 changed files with 5 additions and 0 deletions
|
|
@ -204,6 +204,11 @@ func convert(zr *dns.ZoneRecord, domain string) ([]*models.RecordConfig, error)
|
|||
}
|
||||
rec.SetLabelFromFQDN(zr.Domain, domain)
|
||||
switch rtype := zr.Type; rtype {
|
||||
case "DNSKEY", "RRSIG":
|
||||
// if a zone is enabled for DNSSEC, NS1 autoconfigures DNSKEY & RRSIG records.
|
||||
// these entries are not modifiable via the API though, so we have to ignore them while converting.
|
||||
// ie. API returns "405 Operation on DNSSEC record is not allowed" on such operations
|
||||
continue
|
||||
case "ALIAS":
|
||||
rec.Type = rtype
|
||||
if err := rec.SetTarget(ans); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue