mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-22 09:29:50 +00:00
ForwarderZone: overrided Disabled property to control notify. Updated Notify property to only allow catalog zones to use new notify option.
This commit is contained in:
@@ -274,6 +274,23 @@ namespace DnsServerCore.Dns.Zones
|
|||||||
|
|
||||||
#region properties
|
#region properties
|
||||||
|
|
||||||
|
public override bool Disabled
|
||||||
|
{
|
||||||
|
get { return base.Disabled; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (base.Disabled == value)
|
||||||
|
return;
|
||||||
|
|
||||||
|
base.Disabled = value; //set value early to be able to use it for notify
|
||||||
|
|
||||||
|
if (value)
|
||||||
|
DisableNotifyTimer();
|
||||||
|
else
|
||||||
|
TriggerNotify();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override AuthZoneQueryAccess QueryAccess
|
public override AuthZoneQueryAccess QueryAccess
|
||||||
{
|
{
|
||||||
get { return base.QueryAccess; }
|
get { return base.QueryAccess; }
|
||||||
@@ -316,6 +333,12 @@ namespace DnsServerCore.Dns.Zones
|
|||||||
case AuthZoneNotify.ZoneNameServers:
|
case AuthZoneNotify.ZoneNameServers:
|
||||||
case AuthZoneNotify.BothZoneAndSpecifiedNameServers:
|
case AuthZoneNotify.BothZoneAndSpecifiedNameServers:
|
||||||
throw new ArgumentException("The Notify option is invalid for " + GetZoneTypeName() + " zones: " + value.ToString(), nameof(Notify));
|
throw new ArgumentException("The Notify option is invalid for " + GetZoneTypeName() + " zones: " + value.ToString(), nameof(Notify));
|
||||||
|
|
||||||
|
case AuthZoneNotify.SeparateNameServersForCatalogAndMemberZones:
|
||||||
|
if (this is CatalogZone)
|
||||||
|
break;
|
||||||
|
|
||||||
|
throw new ArgumentException("The Notify option is invalid for " + GetZoneTypeName() + " zones: " + value.ToString(), nameof(Notify));
|
||||||
}
|
}
|
||||||
|
|
||||||
base.Notify = value;
|
base.Notify = value;
|
||||||
|
|||||||
Reference in New Issue
Block a user