1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

AUTODNSSEC -> AUTODNSSEC_ON (#863)

* AUTODNSSEC -> AUTODNSSEC_ON
* Validate AutoDNSSEC values
* AUTODNSSEC now generates a warning and does nothing.
This commit is contained in:
Tom Limoncelli
2020-09-27 16:37:42 -04:00
committed by GitHub
parent 9953bf41e9
commit f082ad36c8
15 changed files with 228 additions and 154 deletions

View File

@@ -2,6 +2,7 @@ package powerdns
import (
"context"
"github.com/StackExchange/dnscontrol/v3/models"
"github.com/mittwald/go-powerdns/apis/cryptokeys"
)
@@ -28,7 +29,7 @@ func (api *PowerDNS) getDNSSECCorrections(dc *models.DomainConfig) ([]*models.Co
}
// dnssec is enabled, we want it to be disabled
if hasEnabledKey && !dc.AutoDNSSEC {
if hasEnabledKey && dc.AutoDNSSEC == "off" {
return []*models.Correction{
{
Msg: "Disable DNSSEC",
@@ -38,7 +39,7 @@ func (api *PowerDNS) getDNSSECCorrections(dc *models.DomainConfig) ([]*models.Co
}
// dnssec is disabled, we want it to be enabled
if !hasEnabledKey && dc.AutoDNSSEC {
if !hasEnabledKey && dc.AutoDNSSEC == "on" {
return []*models.Correction{
{
Msg: "Enable DNSSEC",