Skip to content

Commit

Permalink
Make sure we do not map v4 addresses to v6
Browse files Browse the repository at this point in the history
  • Loading branch information
mjrider committed Aug 18, 2017
1 parent e6fbc52 commit 427c373
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vsphere/resource_vsphere_virtual_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ func resourceVSphereVirtualMachineRead(d *schema.ResourceData, meta interface{})
log.Printf("[DEBUG] ip.PrefixLength - %#v", ip.PrefixLength)
networkInterface["ipv4_address"] = p.String()
networkInterface["ipv4_prefix_length"] = ip.PrefixLength
} else if p.To16() != nil && !ok6 && !p.IsLinkLocalUnicast() {
} else if p.To4() == nil && p.To16() != nil && !ok6 && !p.IsLinkLocalUnicast() {
log.Printf("[DEBUG] p.String - %#v", p.String())
log.Printf("[DEBUG] ip.PrefixLength - %#v", ip.PrefixLength)
networkInterface["ipv6_address"] = p.String()
Expand Down

0 comments on commit 427c373

Please sign in to comment.