diff --git a/builder/vmware/common/driver.go b/builder/vmware/common/driver.go index 811ed6962..db50a2889 100644 --- a/builder/vmware/common/driver.go +++ b/builder/vmware/common/driver.go @@ -462,7 +462,7 @@ func (d *VmwareDriver) PotentialGuestIP(state multistep.StateBag) ([]string, err available_lease_entries := make([]appleDhcpLeaseEntry, 0) for _, entry := range leaseEntries { // Next check for any where the hardware address matches. - if bytes.Equal(hwaddr, []byte(entry.hwAddress)) { + if bytes.Equal(hwaddr, entry.hwAddress) { available_lease_entries = append(available_lease_entries, entry) } } diff --git a/builder/vmware/common/driver_parser.go b/builder/vmware/common/driver_parser.go index 839acc20f..7ea077d18 100644 --- a/builder/vmware/common/driver_parser.go +++ b/builder/vmware/common/driver_parser.go @@ -2462,7 +2462,7 @@ func readAppleDhcpdLeaseEntry(in chan byte) (entry *appleDhcpLeaseEntry, err err if !ok { insideBraces = false } - if item_s == "{" || item_s == "}" { + if strings.Contains(item_s, "{") || strings.Contains(item_s, "}") { continue } splittedLine := strings.Split(item_s, "=")