mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-02-19 14:27:02 +00:00
DhcpServer: Implemented RemoveLease() method to remove lease and update DNS auth zone.
This commit is contained in:
@@ -1334,6 +1334,16 @@ namespace DnsServerCore.Dhcp
|
||||
SaveScopeFile(scope);
|
||||
}
|
||||
|
||||
public void RemoveLease(string scopeName, string hardwareAddress)
|
||||
{
|
||||
Scope scope = GetScope(scopeName);
|
||||
if (scope == null)
|
||||
throw new DhcpServerException("DHCP scope does not exists: " + scopeName);
|
||||
|
||||
Lease removedLease = scope.RemoveLease(hardwareAddress);
|
||||
UpdateDnsAuthZone(false, scope, removedLease);
|
||||
}
|
||||
|
||||
public IDictionary<string, string> GetAddressHostNameMap()
|
||||
{
|
||||
Dictionary<string, string> map = new Dictionary<string, string>();
|
||||
|
||||
Reference in New Issue
Block a user