udev: get rid of "Could not set flow control of" message on "lo" interface
When setting flow control attributes of an interface we first acquire the current settings and then add in the new settings before applying them again. This only works on interfaces that implement the ethtool ioctls. on others we'll see an ugly "Could not set flow control of" message, simply because we issue the SIOCETHTOOL ioctl once, for getting the data. In particular we'll get it for the "lo" interface all the time, which sucks hard. Let's get rid of it.
This commit is contained in:
parent
c07f18ffd4
commit
cb1277fa3b
|
@ -413,9 +413,11 @@ int link_config_apply(link_config_ctx *ctx, link_config *config,
|
|||
log_warning_errno(r, "Could not set ring buffer of %s: %m", old_name);
|
||||
}
|
||||
|
||||
if (config->rx_flow_control >= 0 || config->tx_flow_control >= 0 || config->autoneg_flow_control >= 0) {
|
||||
r = ethtool_set_flow_control(&ctx->ethtool_fd, old_name, config->rx_flow_control, config->tx_flow_control, config->autoneg_flow_control);
|
||||
if (r < 0)
|
||||
log_warning_errno(r, "Could not set flow control of %s: %m", old_name);
|
||||
}
|
||||
|
||||
r = sd_device_get_ifindex(device, &ifindex);
|
||||
if (r < 0)
|
||||
|
|
Loading…
Reference in a new issue