diff options
| author | Michael Biebl <biebl@debian.org> | 2016-05-11 17:08:25 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-05-11 17:08:25 +0200 |
| commit | 73e152af6e3fb4f5848bfb8394484026ff119003 (patch) | |
| tree | d5a8b37778d3a95c51511451b38b6a329b94cb41 /src/platform/nm-linux-platform.c | |
| parent | 78c3b8801ecf4975e5da1af3b10ae20dd2d876de (diff) | |
Imported Upstream version 1.2.2 upstream/1.2.2
Diffstat (limited to 'src/platform/nm-linux-platform.c')
| -rw-r--r-- | src/platform/nm-linux-platform.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 254f9c85..c5045503 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -632,7 +632,9 @@ _linktype_get_type (NMPlatform *platform, obj = _lookup_cached_link (cache, ifindex, completed_from_cache, link_cached); /* If we detected the link type before, we stick to that - * decision unless the "kind" changed. + * decision unless the "kind" no "name" changed. If "name" changed, + * it means that their type may not have been determined correctly + * due to race conditions while accessing sysfs. * * This way, we save edditional ethtool/sysctl lookups, but moreover, * we keep the linktype stable and don't change it as long as the link @@ -643,6 +645,7 @@ _linktype_get_type (NMPlatform *platform, * of messing stuff up. */ if ( obj && !NM_IN_SET (obj->link.type, NM_LINK_TYPE_UNKNOWN, NM_LINK_TYPE_NONE) + && !g_strcmp0 (ifname, obj->link.name) && ( !kind || !g_strcmp0 (kind, obj->link.kind))) { nm_assert (obj->link.kind == g_intern_string (obj->link.kind)); |