From d3600f34a2fb5be2b3825130e20c34ac71e8ebff Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 2 Dec 2023 16:44:19 +0530 Subject: [PATCH] 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. --- DnsServerCore/DnsWebService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DnsServerCore/DnsWebService.cs b/DnsServerCore/DnsWebService.cs index 225a3624..33664976 100644 --- a/DnsServerCore/DnsWebService.cs +++ b/DnsServerCore/DnsWebService.cs @@ -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()