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

Ban NO_PURGE when using BIND and others. (#180)

This commit is contained in:
Tom Limoncelli
2017-08-11 12:43:06 -07:00
committed by Craig Peterson
parent 73962470bc
commit 2534c8eaf2
4 changed files with 13 additions and 1 deletions

View File

@@ -249,6 +249,11 @@ func NormalizeAndValidateConfig(config *models.DNSConfig) (errs []error) {
} else {
pTypes = append(pTypes, pType)
}
//If NO_PURGE is in use, make sure this *isn't* a provider that *doesn't* support NO_PURGE.
if domain.KeepUnknown && providers.ProviderHasCabability(pType, providers.CantUseNOPURGE) {
errs = append(errs, fmt.Errorf("%s uses NO_PURGE which is not supported by %s(%s)", domain.Name, p, pType))
}
}
// Normalize Nameservers.