mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-07 05:34:43 +08:00
IMPORT_TRANSFORM: Be more forgiving about non-standard rtypes (#2587)
This commit is contained in:
parent
60f9e4f87f
commit
46f15114dd
1 changed files with 3 additions and 8 deletions
|
@ -263,7 +263,7 @@ func importTransform(srcDomain, dstDomain *models.DomainConfig, transforms []tra
|
|||
}
|
||||
return rec2
|
||||
}
|
||||
switch rec.Type { // #rtype_variations
|
||||
switch rec.Type {
|
||||
case "A":
|
||||
trs, err := transform.IPToList(net.ParseIP(rec.GetTargetField()), transforms)
|
||||
if err != nil {
|
||||
|
@ -278,14 +278,9 @@ func importTransform(srcDomain, dstDomain *models.DomainConfig, transforms []tra
|
|||
r := newRec()
|
||||
r.SetTarget(transformCNAME(r.GetTargetField(), srcDomain.Name, dstDomain.Name))
|
||||
dstDomain.Records = append(dstDomain.Records, r)
|
||||
case "AKAMAICDN", "MX", "NAPTR", "NS", "SOA", "SRV", "TXT", "CAA", "TLSA":
|
||||
// Not imported.
|
||||
continue
|
||||
case "LOC":
|
||||
continue
|
||||
default:
|
||||
return fmt.Errorf("import_transform: Unimplemented record type %v (%v)",
|
||||
rec.Type, rec.GetLabel())
|
||||
// Anything else is ignored.
|
||||
continue
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Add table
Reference in a new issue