From 92de0601d3e3197553ec8bf7c7441abdef06d2b7 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 6 Jun 2020 16:23:08 +0530 Subject: [PATCH] CacheZoneManager: added failure record TTL support. Code refactoring done. --- .../Dns/{Zones => ZoneManagers}/CacheZoneManager.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename DnsServerCore/Dns/{Zones => ZoneManagers}/CacheZoneManager.cs (97%) diff --git a/DnsServerCore/Dns/Zones/CacheZoneManager.cs b/DnsServerCore/Dns/ZoneManagers/CacheZoneManager.cs similarity index 97% rename from DnsServerCore/Dns/Zones/CacheZoneManager.cs rename to DnsServerCore/Dns/ZoneManagers/CacheZoneManager.cs index c47a9cd4..b8e9cf49 100644 --- a/DnsServerCore/Dns/Zones/CacheZoneManager.cs +++ b/DnsServerCore/Dns/ZoneManagers/CacheZoneManager.cs @@ -17,17 +17,18 @@ along with this program. If not, see . */ -using System; +using DnsServerCore.Dns.Zones; using System.Collections.Generic; using TechnitiumLibrary.Net.Dns; using TechnitiumLibrary.Net.Dns.ResourceRecords; -namespace DnsServerCore.Dns.Zones +namespace DnsServerCore.Dns.ZoneManagers { public class CacheZoneManager : DnsCache { #region variables + const uint FAILURE_RECORD_TTL = 30u; const uint NEGATIVE_RECORD_TTL = 300u; const uint MINIMUM_RECORD_TTL = 10u; const uint SERVE_STALE_TTL = 7 * 24 * 60 * 60; //7 days serve stale ttl as per draft-ietf-dnsop-serve-stale-04 @@ -39,7 +40,7 @@ namespace DnsServerCore.Dns.Zones #region constructor public CacheZoneManager() - : base(NEGATIVE_RECORD_TTL, MINIMUM_RECORD_TTL, SERVE_STALE_TTL) + : base(FAILURE_RECORD_TTL, NEGATIVE_RECORD_TTL, MINIMUM_RECORD_TTL, SERVE_STALE_TTL) { } #endregion