From ea7051fa1c10dec6b778509ae9140993bd023aa8 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 1 Jun 2024 18:48:07 +0530 Subject: [PATCH] PrimarySubDomainZone: code refactoring changes. --- DnsServerCore/Dns/Zones/PrimarySubDomainZone.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DnsServerCore/Dns/Zones/PrimarySubDomainZone.cs b/DnsServerCore/Dns/Zones/PrimarySubDomainZone.cs index 0588adfc..e34fb819 100644 --- a/DnsServerCore/Dns/Zones/PrimarySubDomainZone.cs +++ b/DnsServerCore/Dns/Zones/PrimarySubDomainZone.cs @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2023 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -66,7 +66,7 @@ namespace DnsServerCore.Dns.Zones default: foreach (DnsResourceRecord record in records) { - if (record.GetAuthRecordInfo().Disabled) + if (record.GetAuthGenericRecordInfo().Disabled) throw new DnsServerException("Cannot set records: disabling records in a signed zones is not supported."); } @@ -117,7 +117,7 @@ namespace DnsServerCore.Dns.Zones throw new DnsServerException("The record type is not supported by DNSSEC signed primary zones."); default: - if (record.GetAuthRecordInfo().Disabled) + if (record.GetAuthGenericRecordInfo().Disabled) throw new DnsServerException("Cannot add record: disabling records in a signed zones is not supported."); break; @@ -229,7 +229,7 @@ namespace DnsServerCore.Dns.Zones if (oldRecord.Type != newRecord.Type) throw new InvalidOperationException("Old and new record types do not match."); - if ((_primaryZone.DnssecStatus != AuthZoneDnssecStatus.Unsigned) && newRecord.GetAuthRecordInfo().Disabled) + if ((_primaryZone.DnssecStatus != AuthZoneDnssecStatus.Unsigned) && newRecord.GetAuthGenericRecordInfo().Disabled) throw new DnsServerException("Cannot update record: disabling records in a signed zones is not supported."); if (newRecord.OriginalTtlValue > _primaryZone.GetZoneSoaExpire())