Loopia: now passes test: 18:testByRecordSet (#2231)

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Paul Dee 2023-03-25 16:26:45 +01:00 committed by GitHub
parent a3934e7b35
commit f51f9436b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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":