Re: [PATCH] core: Fix check for failure in translating link name to ifindex
- From: Dan Williams <dcbw redhat com>
- To: Thomas Graf <tgraf redhat com>
- Cc: networkmanager-list gnome org
- Subject: Re: [PATCH] core: Fix check for failure in translating link name to ifindex
- Date: Wed, 14 Sep 2011 12:33:00 -0500
On Wed, 2011-09-14 at 00:05 +0200, Thomas Graf wrote:
> 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);
> }
> }
Applied, thanks!
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]