mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 23:10:18 +01:00
core: Fix check for failure in translating link name to ifindex
rtnl_link_name2i() returns 0 (unspecified ifindex) if translation did not succeed.
This commit is contained in:
parent
d2069c56e8
commit
d6864d7cf5
1 changed files with 1 additions and 1 deletions
|
|
@ -3404,7 +3404,7 @@ set_property (GObject *object, guint prop_id,
|
|||
priv->iface = g_value_dup_string (value);
|
||||
if (priv->iface) {
|
||||
priv->ifindex = nm_netlink_iface_to_index (priv->iface);
|
||||
if (priv->ifindex < 0) {
|
||||
if (priv->ifindex <= 0) {
|
||||
nm_log_warn (LOGD_HW, "(%s): failed to look up interface index", priv->iface);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue