From 68fa1685f87958923904759d4422269370ca0d56 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 8 May 2021 15:44:49 +0530 Subject: [PATCH] SecondaryZone: updated SetRecords() to support comments for SOA record. --- DnsServerCore/Dns/Zones/SecondaryZone.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/DnsServerCore/Dns/Zones/SecondaryZone.cs b/DnsServerCore/Dns/Zones/SecondaryZone.cs index 2d1088ed..f04db136 100644 --- a/DnsServerCore/Dns/Zones/SecondaryZone.cs +++ b/DnsServerCore/Dns/Zones/SecondaryZone.cs @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2020 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2021 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 @@ -349,7 +349,10 @@ namespace DnsServerCore.Dns.Zones if ((records.Count != 1) || !records[0].Name.Equals(_name, StringComparison.OrdinalIgnoreCase)) throw new InvalidOperationException("Invalid SOA record."); - _entries[DnsResourceRecordType.SOA][0].SetGlueRecords(records.GetGlueRecords()); + DnsResourceRecord existingSoaRR = _entries[DnsResourceRecordType.SOA][0]; + + existingSoaRR.SetGlueRecords(records.GetGlueRecords()); + existingSoaRR.SetComments(records[0].GetComments()); break; default: