if (!network->vlans)
return log_oom();
- network->macvlans = hashmap_new(uint64_hash_func, uint64_compare_func);
+ network->macvlans = hashmap_new(string_hash_func, string_compare_func);
if (!network->macvlans)
return log_oom();
- network->vxlans = hashmap_new(uint64_hash_func, uint64_compare_func);
+ network->vxlans = hashmap_new(string_hash_func, string_compare_func);
if (!network->vxlans)
return log_oom();
break;
case NETDEV_KIND_VLAN:
- r = hashmap_put(network->vlans, &netdev->vlanid, netdev);
+ r = hashmap_put(network->vlans, netdev->ifname, netdev);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, EINVAL,
- "Can not add VLAN to network: %s", rvalue);
+ "Can not add VLAN '%s' to network: %s",
+ rvalue, strerror(-r));
return 0;
}
r = hashmap_put(network->macvlans, netdev->ifname, netdev);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, EINVAL,
- "Can not add MACVLAN to network: %s", rvalue);
+ "Can not add MACVLAN '%s' to network: %s",
+ rvalue, strerror(-r));
return 0;
}
r = hashmap_put(network->vxlans, netdev->ifname, netdev);
if (r < 0) {
log_syntax(unit, LOG_ERR, filename, line, EINVAL,
- "Can not add VXLAN to network: %s", rvalue);
+ "Can not add VXLAN '%s' to network: %s",
+ rvalue, strerror(-r));
return 0;
}