mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-02-19 14:27:02 +00:00
AuthZoneManager: fixed issue in IXFR which caused empty node to remain in the zone tree.
This commit is contained in:
@@ -1826,9 +1826,16 @@ namespace DnsServerCore.Dns.ZoneManagers
|
||||
AuthZone zone = GetOrAddSubDomainZone(zoneName, deletedEntry.Key);
|
||||
|
||||
if (zone.Name.Equals(zoneName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
zone.SyncRecords(deletedEntry.Value, null);
|
||||
}
|
||||
else if ((zone is SubDomainZone subDomainZone) && subDomainZone.AuthoritativeZone.Name.Equals(zoneName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
zone.SyncRecords(deletedEntry.Value, null);
|
||||
|
||||
if (zone.IsEmpty)
|
||||
_root.TryRemove(deletedEntry.Key, out SubDomainZone _); //remove empty sub zone
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user