diff --git a/DnsServerCore/Dhcp/DhcpServer.cs b/DnsServerCore/Dhcp/DhcpServer.cs index d1c1d536..9130448a 100644 --- a/DnsServerCore/Dhcp/DhcpServer.cs +++ b/DnsServerCore/Dhcp/DhcpServer.cs @@ -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 GetAddressHostNameMap() { Dictionary map = new Dictionary();