DnsWebService: Implemented DNS Client udp socket pool port exclusion feature to avoid issues with web service http/3 udp port. Updated LoadConfigFile() to set resolver log manager by default.

This commit is contained in:
Shreyas Zare
2023-12-02 16:44:19 +05:30
parent 8444108310
commit d3600f34a2

View File

@@ -51,6 +51,7 @@ using TechnitiumLibrary;
using TechnitiumLibrary.IO;
using TechnitiumLibrary.Net;
using TechnitiumLibrary.Net.Dns;
using TechnitiumLibrary.Net.Dns.ClientConnection;
using TechnitiumLibrary.Net.Dns.ResourceRecords;
using TechnitiumLibrary.Net.Proxy;
@@ -994,6 +995,8 @@ namespace DnsServerCore
}
//logging
_dnsServer.ResolverLogManager = _log;
string strUseLocalTime = Environment.GetEnvironmentVariable("DNS_SERVER_LOG_USING_LOCAL_TIME");
if (!string.IsNullOrEmpty(strUseLocalTime))
_log.UseLocalTime = bool.Parse(strUseLocalTime);
@@ -1006,6 +1009,9 @@ namespace DnsServerCore
_log.Write("Note: You may try deleting the config file to fix this issue. However, you will lose DNS settings but, zone data wont be affected.");
throw;
}
//exclude web service TLS port to prevent socket pool from occupying it
UdpClientConnection.SocketPoolExcludedPorts = new int[] { _webServiceTlsPort };
}
private void CreateForwarderZoneToDisableDnssecForNTP()