From 8dc6e9e8d60de7b95a82e586b79f0ba8169c91f0 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 6 Jun 2020 16:19:08 +0530 Subject: [PATCH] ZoneTree: changes done for Stub and Forwarder zone implementation. --- DnsServerCore/Dns/Zones/ZoneTree.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/DnsServerCore/Dns/Zones/ZoneTree.cs b/DnsServerCore/Dns/Zones/ZoneTree.cs index 21535fbe..0b7d3526 100644 --- a/DnsServerCore/Dns/Zones/ZoneTree.cs +++ b/DnsServerCore/Dns/Zones/ZoneTree.cs @@ -406,9 +406,9 @@ namespace DnsServerCore.Dns.Zones { if (zoneValue is AuthZone) { - if ((zoneValue is PrimaryZone) || (zoneValue is SecondaryZone) || (zoneValue is StubZone)) + if ((zoneValue is PrimaryZone) || (zoneValue is SecondaryZone) || (zoneValue is StubZone) || (zoneValue is ForwarderZone)) { - //hosted primary/secondary/stub zone found + //hosted primary/secondary/stub/forwarder zone found closestDelegation = null; closestAuthority = value; } @@ -573,7 +573,7 @@ namespace DnsServerCore.Dns.Zones T zone = nodeValue.Value; if (zone != null) { - if ((zone is PrimaryZone) || (zone is SecondaryZone)) + if ((zone is PrimaryZone) || (zone is SecondaryZone) || (zone is StubZone) || (zone is ForwarderZone)) { zones.Add(zone); @@ -595,10 +595,6 @@ namespace DnsServerCore.Dns.Zones } while (true); } - else if (zone is StubZone) - { - zones.Add(zone); - } } } @@ -689,7 +685,7 @@ namespace DnsServerCore.Dns.Zones else delegation = null; - if ((zoneValue is PrimaryZone) || (zoneValue is SecondaryZone) || (zoneValue is StubZone)) + if ((zoneValue is PrimaryZone) || (zoneValue is SecondaryZone) || (zoneValue is StubZone) || (zoneValue is ForwarderZone)) authority = zoneValue; else if ((closestAuthority != null) && IsKeySubDomain(closestAuthority.Key, key)) authority = closestAuthority.Value;