mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-01-10 02:35:49 +00:00
DnsServer: Updated code to write more specific error log for dynamic updates security policy.
This commit is contained in:
@@ -1308,7 +1308,11 @@ namespace DnsServerCore.Dns
|
||||
}
|
||||
|
||||
if (!isPermitted)
|
||||
{
|
||||
_log?.Write(remoteEP, protocol, "DNS Server refused a zone UPDATE request [" + uRecord.Name.ToLowerInvariant() + " " + uRecord.Type.ToString() + " " + uRecord.Class.ToString() + "] due to Dynamic Updates Security Policy for zone: " + (authZoneInfo.Name == "" ? "<root>" : authZoneInfo.Name));
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1440,11 +1444,7 @@ namespace DnsServerCore.Dns
|
||||
|
||||
//check for permissions
|
||||
if (!await IsUpdatePermittedAsync())
|
||||
{
|
||||
_log?.Write(remoteEP, protocol, "DNS Server refused a zone UPDATE request due to Dynamic Updates Security Policy for zone: " + (authZoneInfo.Name == "" ? "<root>" : authZoneInfo.Name));
|
||||
|
||||
return new DnsDatagram(request.Identifier, true, DnsOpcode.Update, false, false, request.RecursionDesired, false, false, false, DnsResponseCode.Refused, request.Question) { Tag = DnsServerResponseType.Authoritative };
|
||||
}
|
||||
|
||||
//process update section
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user