mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-07 21:54:59 +08:00
BUG: R53_ALIAS false positive during duplicate checking (#505)
This commit is contained in:
parent
2d9d93653b
commit
98232b0933
1 changed files with 9 additions and 2 deletions
|
@ -47,9 +47,16 @@ func (rc *RecordConfig) GetTargetIP() net.IP {
|
|||
// GetTargetCombined returns a string with the various fields combined.
|
||||
// For example, an MX record might output `10 mx10.example.tld`.
|
||||
func (rc *RecordConfig) GetTargetCombined() string {
|
||||
// If this is a pseudo record, just return the target.
|
||||
// Pseudo records:
|
||||
if _, ok := dns.StringToType[rc.Type]; !ok {
|
||||
return rc.Target
|
||||
switch rc.Type { // #rtype_variations
|
||||
case "R53_ALIAS":
|
||||
// Differentiate between multiple R53_ALIASs on the same label.
|
||||
return fmt.Sprintf("%s type=%s zone_id=%s", rc.Target, rc.R53Alias["type"], rc.R53Alias["zone_id"])
|
||||
default:
|
||||
// Just return the target.
|
||||
return rc.Target
|
||||
}
|
||||
}
|
||||
|
||||
// We cheat by converting to a dns.RR and use the String() function.
|
||||
|
|
Loading…
Add table
Reference in a new issue