From bc4b65e2c323f5d69c87e4786dd9aa76f87c7645 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 21 Sep 2024 12:31:37 +0530 Subject: [PATCH] AuthZoneTree: added GetApexZone() method. --- DnsServerCore/Dns/Trees/AuthZoneTree.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/DnsServerCore/Dns/Trees/AuthZoneTree.cs b/DnsServerCore/Dns/Trees/AuthZoneTree.cs index b329ada8..ff69a96a 100644 --- a/DnsServerCore/Dns/Trees/AuthZoneTree.cs +++ b/DnsServerCore/Dns/Trees/AuthZoneTree.cs @@ -661,6 +661,14 @@ namespace DnsServerCore.Dns.Trees return null; } + public ApexZone GetApexZone(string zoneName) + { + if (TryGet(zoneName, out AuthZoneNode authZoneNode)) + return authZoneNode.ApexZone; + + return null; + } + public AuthZone FindZone(string domain, out SubDomainZone closest, out SubDomainZone delegation, out ApexZone authority, out bool hasSubDomains) { byte[] key = ConvertToByteKey(domain);