From 6c2f96421b1c7bfd65032bf4de2a6cfc10b3b262 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 31 Jan 2014 14:54:31 +0100 Subject: [PATCH] core/platform: fix wrong warning log in nm-linux-platform According to documentation, nl_rtgen_request() returns 0 on success. Due to a bug (fixed upstream) in older libnl versions, nl_rtgen_request() returns the number of bytes sent, which caused logging although succeeding. Signed-off-by: Thomas Haller --- src/platform/nm-linux-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 9fc264aeb6..81630fe60b 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -2849,7 +2849,7 @@ setup (NMPlatform *platform) /* request all IPv6 addresses (hopeing that there is at least one), to check for * the IFA_FLAGS attribute. */ nle = nl_rtgen_request (priv->nlh_event, RTM_GETADDR, AF_INET6, NLM_F_DUMP); - if (nle != 0) + if (nle < 0) nm_log_warn (LOGD_PLATFORM, "Netlink error: requesting RTM_GETADDR failed with %s", nl_geterror (nle)); return TRUE;