mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-01-08 09:44:00 +00:00
WebServiceZonesApi: updated WriteRecordAsJson() to add parentSideTtl value for NS records.
This commit is contained in:
@@ -27,6 +27,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using TechnitiumLibrary.Net;
|
||||
using TechnitiumLibrary.Net.Dns;
|
||||
using TechnitiumLibrary.Net.Dns.ResourceRecords;
|
||||
using TechnitiumLibrary.Net.Proxy;
|
||||
@@ -151,6 +152,17 @@ namespace DnsServerCore
|
||||
{
|
||||
jsonWriter.WritePropertyName("nameServer");
|
||||
jsonWriter.WriteValue(rdata.NameServer.Length == 0 ? "." : rdata.NameServer);
|
||||
|
||||
if (!authoritativeZoneRecords)
|
||||
{
|
||||
if (rdata.IsParentSideTtlSet)
|
||||
{
|
||||
int parentSideTtl = (int)rdata.ParentSideTtl;
|
||||
|
||||
jsonWriter.WritePropertyName("parentSideTtl");
|
||||
jsonWriter.WriteValue(parentSideTtl + " (" + WebUtilities.GetFormattedTime(parentSideTtl) + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user