mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
network: fix return values
This commit is contained in:
parent
5a9494bedb
commit
72f092815a
|
@ -432,7 +432,7 @@ int netdev_set_ifindex(NetDev *netdev, sd_netlink_message *message) {
|
||||||
if (!streq(netdev->ifname, received_name)) {
|
if (!streq(netdev->ifname, received_name)) {
|
||||||
log_netdev_error(netdev, "Received newlink with wrong IFNAME %s", received_name);
|
log_netdev_error(netdev, "Received newlink with wrong IFNAME %s", received_name);
|
||||||
netdev_enter_failed(netdev);
|
netdev_enter_failed(netdev);
|
||||||
return r;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = sd_netlink_message_enter_container(message, IFLA_LINKINFO);
|
r = sd_netlink_message_enter_container(message, IFLA_LINKINFO);
|
||||||
|
@ -460,11 +460,10 @@ int netdev_set_ifindex(NetDev *netdev, sd_netlink_message *message) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!streq(kind, received_kind)) {
|
if (!streq(kind, received_kind)) {
|
||||||
log_netdev_error(netdev,
|
log_netdev_error(netdev, "Received newlink with wrong KIND %s, expected %s",
|
||||||
"Received newlink with wrong KIND %s, "
|
received_kind, kind);
|
||||||
"expected %s", received_kind, kind);
|
|
||||||
netdev_enter_failed(netdev);
|
netdev_enter_failed(netdev);
|
||||||
return r;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
netdev->ifindex = ifindex;
|
netdev->ifindex = ifindex;
|
||||||
|
|
Loading…
Reference in a new issue