summaryrefslogtreecommitdiff
path: root/src/platform/nmp-object.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-02-19 01:06:28 +0100
committerThomas Haller <thaller@redhat.com>2016-02-20 00:19:09 +0100
commit6635e54d613304c3b319d822d6ae1a93d016e968 (patch)
tree7d58a573cf408dff8a2a9a3c60ebc55fab940a4d /src/platform/nmp-object.c
parent94d6aaac70ecec4baca6a072d32825287f8ee109 (diff)
downloadNetworkManager-th/platform-netns.tar.gz
platform: add network namespace support to platformth/platform-netns
Platform not only uses the netlink socket, but also sysfs, udev, ethtool, mii. To properly support network namespaces, we must switch the namespace as necessary. In case of udev, it is only supported on the main namespace.
Diffstat (limited to 'src/platform/nmp-object.c')
-rw-r--r--src/platform/nmp-object.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c
index aa5d918c98..7c5b680d26 100644
--- a/src/platform/nmp-object.c
+++ b/src/platform/nmp-object.c
@@ -1856,7 +1856,7 @@ nmp_cache_update_link_master_connected (NMPCache *cache, int ifindex, NMPObject
/******************************************************************/
NMPCache *
-nmp_cache_new ()
+nmp_cache_new (gboolean use_udev)
{
NMPCache *cache = g_new (NMPCache, 1);
@@ -1868,7 +1868,7 @@ nmp_cache_new ()
(NMMultiIndexFuncEqual) nmp_cache_id_equal,
(NMMultiIndexFuncClone) nmp_cache_id_clone,
(NMMultiIndexFuncDestroy) nmp_cache_id_destroy);
- cache->use_udev = nmp_cache_use_udev_detect ();
+ cache->use_udev = !!use_udev;
return cache;
}