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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user