Updated Simple DNS 5 SRV Missing Terminator
This commit is contained in:
parent
5b6a52544c
commit
2061e6ab6c
1 changed files with 75 additions and 73 deletions
|
@ -99,8 +99,8 @@ namespace WebsitePanel.Providers.DNS
|
||||||
{ DnsRecordType.MX, new BuildDnsRecordDataEventHandler(BuildRecordData_MXRecord) },
|
{ DnsRecordType.MX, new BuildDnsRecordDataEventHandler(BuildRecordData_MXRecord) },
|
||||||
// TXT
|
// TXT
|
||||||
{ DnsRecordType.TXT, new BuildDnsRecordDataEventHandler(BuildRecordData_TXTRecord) },
|
{ DnsRecordType.TXT, new BuildDnsRecordDataEventHandler(BuildRecordData_TXTRecord) },
|
||||||
// SRV
|
// SRV
|
||||||
{ DnsRecordType.SRV, new BuildDnsRecordDataEventHandler(BuildRecordData_SRVRecord) },
|
{ DnsRecordType.SRV, new BuildDnsRecordDataEventHandler(BuildRecordData_SRVRecord) },
|
||||||
};
|
};
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -137,77 +137,79 @@ namespace WebsitePanel.Providers.DNS
|
||||||
return zoneName;
|
return zoneName;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected DnsRecord ConvertToNative(DNSRecord record, string zoneName)
|
protected DnsRecord ConvertToNative(DNSRecord record, string zoneName)
|
||||||
{
|
{
|
||||||
string recordName = ConvertRecordNameToInternalFormat(record.Name, zoneName);
|
string recordName = ConvertRecordNameToInternalFormat(record.Name, zoneName);
|
||||||
//
|
//
|
||||||
DnsRecord dnsRecord = null;
|
DnsRecord dnsRecord = null;
|
||||||
switch (record.Type)
|
switch (record.Type)
|
||||||
{
|
{
|
||||||
case "A":
|
case "A":
|
||||||
dnsRecord = new DnsRecord
|
dnsRecord = new DnsRecord
|
||||||
{
|
{
|
||||||
RecordName = recordName,
|
RecordName = recordName,
|
||||||
RecordType = DnsRecordType.A,
|
RecordType = DnsRecordType.A,
|
||||||
RecordData = record.DataFields[0]
|
RecordData = record.DataFields[0]
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case "AAAA":
|
case "AAAA":
|
||||||
dnsRecord = new DnsRecord {
|
dnsRecord = new DnsRecord
|
||||||
RecordName = recordName,
|
{
|
||||||
RecordType = DnsRecordType.AAAA,
|
RecordName = recordName,
|
||||||
RecordData = record.DataFields[0]
|
RecordType = DnsRecordType.AAAA,
|
||||||
};
|
RecordData = record.DataFields[0]
|
||||||
break;
|
};
|
||||||
case "NS":
|
break;
|
||||||
dnsRecord = new DnsRecord
|
case "NS":
|
||||||
{
|
dnsRecord = new DnsRecord
|
||||||
RecordName = recordName,
|
{
|
||||||
RecordType = DnsRecordType.NS,
|
RecordName = recordName,
|
||||||
RecordData = record.DataFields[0]
|
RecordType = DnsRecordType.NS,
|
||||||
};
|
RecordData = record.DataFields[0]
|
||||||
break;
|
};
|
||||||
case "CNAME":
|
break;
|
||||||
dnsRecord = new DnsRecord
|
case "CNAME":
|
||||||
{
|
dnsRecord = new DnsRecord
|
||||||
RecordName = recordName,
|
{
|
||||||
RecordType = DnsRecordType.CNAME,
|
RecordName = recordName,
|
||||||
RecordData = record.DataFields[0]
|
RecordType = DnsRecordType.CNAME,
|
||||||
};
|
RecordData = record.DataFields[0]
|
||||||
break;
|
};
|
||||||
case "MX":
|
break;
|
||||||
dnsRecord = new DnsRecord
|
case "MX":
|
||||||
{
|
dnsRecord = new DnsRecord
|
||||||
RecordName = recordName,
|
{
|
||||||
RecordType = DnsRecordType.MX,
|
RecordName = recordName,
|
||||||
MxPriority = Convert.ToInt32(record.DataFields[MX_RECORD_PRIORITY]),
|
RecordType = DnsRecordType.MX,
|
||||||
RecordData = record.DataFields[MX_RECORD_NAMESERVER]
|
MxPriority = Convert.ToInt32(record.DataFields[MX_RECORD_PRIORITY]),
|
||||||
};
|
RecordData = record.DataFields[MX_RECORD_NAMESERVER]
|
||||||
break;
|
};
|
||||||
case "TXT":
|
break;
|
||||||
dnsRecord = new DnsRecord
|
case "TXT":
|
||||||
{
|
dnsRecord = new DnsRecord
|
||||||
RecordName = recordName,
|
{
|
||||||
RecordType = DnsRecordType.TXT,
|
RecordName = recordName,
|
||||||
RecordData = record.DataFields[0]
|
RecordType = DnsRecordType.TXT,
|
||||||
};
|
RecordData = record.DataFields[0]
|
||||||
break;
|
};
|
||||||
case "SRV":
|
break;
|
||||||
dnsRecord = new DnsRecord
|
case "SRV":
|
||||||
{
|
dnsRecord = new DnsRecord
|
||||||
RecordName = recordName,
|
{
|
||||||
RecordType = DnsRecordType.SRV,
|
RecordName = recordName,
|
||||||
RecordData = record.DataFields[3],
|
RecordType = DnsRecordType.SRV,
|
||||||
SrvPriority = Convert.ToInt32(record.DataFields[0]),
|
RecordData = record.DataFields[3],
|
||||||
SrvWeight = Convert.ToInt32(record.DataFields[1]),
|
SrvPriority = Convert.ToInt32(record.DataFields[0]),
|
||||||
SrvPort = Convert.ToInt32(record.DataFields[2])
|
SrvWeight = Convert.ToInt32(record.DataFields[1]),
|
||||||
};
|
SrvPort = Convert.ToInt32(record.DataFields[2])
|
||||||
break;
|
};
|
||||||
//
|
break;
|
||||||
return dnsRecord;
|
}
|
||||||
}
|
//
|
||||||
|
return dnsRecord;
|
||||||
/// <summary>
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
/// Setups connection with the Simple DNS instance
|
/// Setups connection with the Simple DNS instance
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue