rtnl_link_name2i() returns 0 (unspecified ifindex) if translation
did not succeed.
---
 src/nm-device.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/nm-device.c b/src/nm-device.c
index 3522ea4..1f8f1f6 100644
--- a/src/nm-device.c
+++ b/src/nm-device.c
@@ -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);
                        }
                }
-- 
1.7.6

_______________________________________________
networkmanager-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to