From eb720faaee9e11ad464682b950b6d9a185b2db73 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 30 Apr 2022 18:14:07 +0530 Subject: [PATCH] AuthZoneTree: updated GetClosestValuesForZone() to fix issue with getting delegation for the zone value. --- DnsServerCore/Dns/Trees/AuthZoneTree.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DnsServerCore/Dns/Trees/AuthZoneTree.cs b/DnsServerCore/Dns/Trees/AuthZoneTree.cs index b8180182..da5bccbd 100644 --- a/DnsServerCore/Dns/Trees/AuthZoneTree.cs +++ b/DnsServerCore/Dns/Trees/AuthZoneTree.cs @@ -346,7 +346,6 @@ namespace DnsServerCore.Dns.Trees if (apexZone is not null) { //hosted primary/secondary/stub/forwarder zone found - closestSubDomain = null; closestDelegation = zoneValue.ParentSideZone; closestAuthority = apexZone; } @@ -355,7 +354,7 @@ namespace DnsServerCore.Dns.Trees //hosted sub domain SubDomainZone subDomainZone = zoneValue.ParentSideZone; - if ((closestDelegation is null) && subDomainZone.ContainsNameServerRecords()) + if (subDomainZone.ContainsNameServerRecords()) closestDelegation = subDomainZone; //delegated sub domain found else closestSubDomain = subDomainZone;