free(link->match_driver);
free(link->match_type);
free(link->description);
+ free(link->alias);
free(link);
}
link->wol = _WOL_INVALID;
link->duplex = _DUP_INVALID;
-
r = config_parse(NULL, filename, file, "Match\0Link\0Ethernet\0", config_item_perf_lookup,
(void*) link_config_gperf_lookup, false, false, link);
if (r < 0) {
- log_warning("Colud not parse config file %s: %s", filename, strerror(-r));
+ log_warning("Could not parse config file %s: %s", filename, strerror(-r));
goto failure;
} else
log_debug("Parsed configuration file %s", filename);
return true;
FOREACH_WORD_QUOTED(w, l, line, state)
- if (strneq(w, "net.ifnames=0", l))
+ if (l == sizeof("net.ifnames=0") - 1 && strneq(w, "net.ifnames=0", l))
return false;
return true;
if (!old_name)
return -EINVAL;
- if (config->description) {
- r = udev_device_set_sysattr_value(device, "ifalias",
- config->description);
- if (r < 0)
- log_warning("Could not set description of %s to '%s': %s",
- old_name, config->description, strerror(-r));
- }
-
r = ethtool_set_speed(ctx->ethtool_fd, old_name, config->speed, config->duplex);
if (r < 0)
log_warning("Could not set speed or duplex of %s to %u Mbytes (%s): %s",
mac = config->mac;
}
- r = rtnl_set_link_properties(ctx->rtnl, ifindex, mac, config->mtu);
+ r = rtnl_set_link_properties(ctx->rtnl, ifindex, config->alias, mac, config->mtu);
if (r < 0) {
- log_warning("Could not set MACAddress or MTU on %s: %s", old_name, strerror(-r));
+ log_warning("Could not set Alias, MACAddress or MTU on %s: %s", old_name, strerror(-r));
return r;
}