mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-25 19:08:53 +00:00
DhcpServer: Updated default scope to use IgnoreClientIdentifierOption option. Updated dhcp log with more details in UpdateDnsAuthZone().
This commit is contained in:
@@ -105,6 +105,7 @@ namespace DnsServerCore.Dhcp
|
||||
scope.UseThisDnsServer = true;
|
||||
scope.DomainName = "home";
|
||||
scope.LeaseTimeDays = 1;
|
||||
scope.IgnoreClientIdentifierOption = true;
|
||||
|
||||
SaveScopeFile(scope);
|
||||
}
|
||||
@@ -791,10 +792,12 @@ namespace DnsServerCore.Dhcp
|
||||
{
|
||||
foreach (DnsResourceRecord existingRecord in existingRecords)
|
||||
{
|
||||
if (!(existingRecord.RDATA as DnsARecordData).Address.Equals(address))
|
||||
IPAddress existingAddress = (existingRecord.RDATA as DnsARecordData).Address;
|
||||
if (!existingAddress.Equals(address))
|
||||
{
|
||||
//a DNS record already exists for the specified domain name with a different address
|
||||
//do not change DNS record for this dynamic lease
|
||||
_log?.Write("DHCP Server cannot update DNS: an A record already exists for '" + domain + "' with a different IP address [" + existingAddress.ToString() + "].");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user