- if ((c = tb[LEASE_ATTR_HOSTID]))
- if (odhcpd_unhexlify((uint8_t*)&lease->hostid, sizeof(lease->hostid),
- blobmsg_get_string(c)) < 0)
+ if ((c = tb[LEASE_ATTR_HOSTID])) {
+ errno = 0;
+ lease->hostid = strtoul(blobmsg_get_string(c), NULL, 16);
+ if (errno)