diff --git a/DnsServerCore/DnsWebService.cs b/DnsServerCore/DnsWebService.cs index 89c74576..edeb9dbd 100644 --- a/DnsServerCore/DnsWebService.cs +++ b/DnsServerCore/DnsWebService.cs @@ -86,6 +86,8 @@ namespace DnsServerCore int _totalZonesAllowed; int _totalZonesBlocked; + List _configDisabledZones; + #endregion #region constructor @@ -3233,11 +3235,14 @@ namespace DnsServerCore if (version <= 6) { - //read for backward compatibility int count = bR.ReadInt32(); + _configDisabledZones = new List(count); for (int i = 0; i < count; i++) - bR.ReadShortString(); //read domain name + { + string domain = bR.ReadShortString(); + _configDisabledZones.Add(domain); + } } if (version > 4) @@ -3531,6 +3536,15 @@ namespace DnsServerCore LoadConfigFile(); LoadZoneFiles(); + if (_configDisabledZones != null) + { + foreach (string domain in _configDisabledZones) + { + _dnsServer.AuthoritativeZoneRoot.DisableZone(domain); + SaveZoneFile(domain); + } + } + ThreadPool.QueueUserWorkItem(delegate (object state) { try