- } else
- log_warning("Invalid MACAddress policy '%s', ignoring.", config->mac_policy);
- }
-
- if (!mac && config->mac) {
- mac = calloc(1, sizeof(struct ether_addr));
- r = sscanf(config->mac, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
- &mac->ether_addr_octet[0],
- &mac->ether_addr_octet[1],
- &mac->ether_addr_octet[2],
- &mac->ether_addr_octet[3],
- &mac->ether_addr_octet[4],
- &mac->ether_addr_octet[5]);
- if (r != 6) {
- r = -EINVAL;
- goto out;
- }