mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-22 09:29:50 +00:00
WebServiceDhcpApi: updated api to support ignoreClientIdentifierOption.
This commit is contained in:
@@ -365,6 +365,7 @@ namespace DnsServerCore
|
|||||||
|
|
||||||
jsonWriter.WriteBoolean("allowOnlyReservedLeases", scope.AllowOnlyReservedLeases);
|
jsonWriter.WriteBoolean("allowOnlyReservedLeases", scope.AllowOnlyReservedLeases);
|
||||||
jsonWriter.WriteBoolean("blockLocallyAdministeredMacAddresses", scope.BlockLocallyAdministeredMacAddresses);
|
jsonWriter.WriteBoolean("blockLocallyAdministeredMacAddresses", scope.BlockLocallyAdministeredMacAddresses);
|
||||||
|
jsonWriter.WriteBoolean("ignoreClientIdentifierOption", scope.IgnoreClientIdentifierOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task SetDhcpScopeAsync(HttpContext context)
|
public async Task SetDhcpScopeAsync(HttpContext context)
|
||||||
@@ -397,6 +398,7 @@ namespace DnsServerCore
|
|||||||
|
|
||||||
scopeExists = false;
|
scopeExists = false;
|
||||||
scope = new Scope(scopeName, true, IPAddress.Parse(strStartingAddress), IPAddress.Parse(strEndingAddress), IPAddress.Parse(strSubnetMask), _dnsWebService._log, _dnsWebService.DhcpServer);
|
scope = new Scope(scopeName, true, IPAddress.Parse(strStartingAddress), IPAddress.Parse(strEndingAddress), IPAddress.Parse(strSubnetMask), _dnsWebService._log, _dnsWebService.DhcpServer);
|
||||||
|
scope.IgnoreClientIdentifierOption = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -638,6 +640,9 @@ namespace DnsServerCore
|
|||||||
if (request.TryGetQueryOrForm("blockLocallyAdministeredMacAddresses", bool.Parse, out bool blockLocallyAdministeredMacAddresses))
|
if (request.TryGetQueryOrForm("blockLocallyAdministeredMacAddresses", bool.Parse, out bool blockLocallyAdministeredMacAddresses))
|
||||||
scope.BlockLocallyAdministeredMacAddresses = blockLocallyAdministeredMacAddresses;
|
scope.BlockLocallyAdministeredMacAddresses = blockLocallyAdministeredMacAddresses;
|
||||||
|
|
||||||
|
if (request.TryGetQueryOrForm("ignoreClientIdentifierOption", bool.Parse, out bool ignoreClientIdentifierOption))
|
||||||
|
scope.IgnoreClientIdentifierOption = ignoreClientIdentifierOption;
|
||||||
|
|
||||||
if (scopeExists)
|
if (scopeExists)
|
||||||
{
|
{
|
||||||
_dnsWebService.DhcpServer.SaveScope(scopeName);
|
_dnsWebService.DhcpServer.SaveScope(scopeName);
|
||||||
|
|||||||
Reference in New Issue
Block a user