Disable zones instead of deleting them
A disabled zone stays in Jarl with its records, options and history, still editable, but named doesn't load it; enabling it serves it as it is then. Signed zones, and zones another view shares, can't be disabled. jarl zone disable|enable, the zone page's Disable/Enable button. Database schema 7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
59baccd636
commit
89663e366b
24 files changed
+264
-26
No files matched your search
@@ -48,6 +48,9 @@ func (c *checker) checkZones() {
|
||||
if err := dnsname.CheckZoneName(z.Name); err != nil {
|
||||
c.zoneProblem(z, Error, "zone_name_invalid", "invalid zone name: %v", err)
|
||||
}
|
||||
if z.Disabled && z.Signed() {
|
||||
c.zoneProblem(z, Error, "zone_disabled_signed", "a signed zone can't be disabled: validating resolvers would lose its signed answers while the parent may still have its DS record; turn signing off first")
|
||||
}
|
||||
k := zkey{z.ViewID, z.Name}
|
||||
if seen[k] {
|
||||
c.zoneProblem(z, Error, "zone_duplicate", "the zone is defined more than once in the same view")
|
||||
@@ -133,6 +136,8 @@ func (c *checker) checkInView(z *model.Zone, viewPos map[int64]int) {
|
||||
c.zoneProblem(z, Error, "zone_inview_invalid", "view %q has no zone %s to share", target.Name, dnsname.Display(z.Name))
|
||||
} else if src.Type != model.ZonePrimary && src.Type != model.ZoneSecondary {
|
||||
c.zoneProblem(z, Error, "zone_inview_invalid", "in-view can only share primary or secondary zones, but %s in view %q is %s", dnsname.Display(z.Name), target.Name, src.Type)
|
||||
} else if src.Disabled && !z.Disabled {
|
||||
c.zoneProblem(z, Error, "zone_inview_disabled", "%s in view %q is disabled, so this zone can't share it; disable this one too, or enable that one", dnsname.Display(z.Name), target.Name)
|
||||
}
|
||||
for _, o := range c.s.ScopedOptions(model.ScopeZone, z.ID) {
|
||||
if o.Name != "forward" && o.Name != "forwarders" {
|
||||
|
||||
Reference in new issue
Block a user