diff options
author | Thomas Haller <thaller@redhat.com> | 2016-02-15 17:17:07 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-02-15 17:19:22 +0100 |
commit | 9c0cfbbae6f83f9b55c8848a62fff42cb40dd73a (patch) | |
tree | 2a5443f9901f6a1aa10016e53a52bbe178d57642 | |
parent | 9ce0995efbf529356175f4a64c6d4ad624b61dfc (diff) | |
download | NetworkManager-9c0cfbbae6f83f9b55c8848a62fff42cb40dd73a.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.
-rw-r--r-- | src/platform/nm-linux-platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 00e34184b5..4c3ba361ce 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -610,7 +610,7 @@ _lookup_cached_link (const NMPCache *cache, int ifindex, gboolean *completed_fro if (!*completed_from_cache) { obj = ifindex > 0 && cache ? nmp_cache_lookup_link (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; |