summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-02-15 17:17:07 +0100
committerThomas Haller <thaller@redhat.com>2016-02-15 17:26:28 +0100
commitab667dd885030bd15f3b0aa3310f3949b8a16df3 (patch)
tree9ab6638900e1c928a25e800f6434ce9e18538392
parentafb244778952b7cfff515963daa516aa29a779c5 (diff)
downloadNetworkManager-ab667dd885030bd15f3b0aa3310f3949b8a16df3.tar.gz
platform: fix detection of link-type for netlink event
Often a netlink event doesn't contain enough information to determine the link type. Then we consult sysctl or ethtool. However, if we already have the same object cached, we want to reused the (once detected) link-type. There was a bug in lookup of the cached object. (cherry picked from commit 9c0cfbbae6f83f9b55c8848a62fff42cb40dd73a)
-rw-r--r--src/platform/nm-linux-platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 0375da944b..4e45e0a164 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -878,7 +878,7 @@ _lookup_link_cached (NMPlatform *platform, int ifindex, gboolean *completed_from
if (!*completed_from_cache) {
obj = ifindex > 0 ? nmp_cache_lookup_link (NM_LINUX_PLATFORM_GET_PRIVATE (platform)->cache, ifindex) : NULL;
- if (obj && !obj->_link.netlink.is_in_netlink)
+ if (obj && obj->_link.netlink.is_in_netlink)
*link_cached = obj;
else
*link_cached = NULL;