mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 01:47:53 +08:00
Loopia: now passes test: 18:testByRecordSet (#2231)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
parent
a3934e7b35
commit
f51f9436b0
1 changed files with 3 additions and 1 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/StackExchange/dnscontrol/v3/models"
|
||||
"github.com/miekg/dns/dnsutil"
|
||||
)
|
||||
|
||||
// nativeToRecord takes a DNS record from Loopia and returns a native RecordConfig struct.
|
||||
|
@ -24,7 +25,8 @@ func nativeToRecord(zr zoneRecord, origin string, subdomain string) (rc *models.
|
|||
case "CAA":
|
||||
err = rc.SetTargetCAAString(record.Rdata)
|
||||
case "MX":
|
||||
err = rc.SetTargetMX(record.Priority, record.Rdata)
|
||||
// See dnscontrol issue #2218
|
||||
err = rc.SetTargetMX(record.Priority, dnsutil.AddOrigin(record.Rdata, origin)+".")
|
||||
case "NAPTR":
|
||||
err = rc.SetTargetNAPTRString(record.Rdata)
|
||||
case "TXT":
|
||||
|
|
Loading…
Reference in a new issue