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;