GNOME Bugzilla – Bug 762408
[review] add net namespace support to NMPlatform [th/platform-netns-bgo762408]
Last modified: 2016-03-07 12:06:12 UTC
although the code is not yet actually used, eventually we want to implement some kind of namespace support for NetworkManager. I would merge this branch early, even if there aren't any users yet.
Unfortunately, valgrind barfs on the tests now: --31105-- WARNING: unhandled amd64-linux syscall: 308 --31105-- You may be able to write your own handler. --31105-- Read the file README_MISSING_SYSCALL_OR_IOCTL. --31105-- Nevertheless we consider this a bug. Please report --31105-- it at http://valgrind.org/support/bug_reports.html. ==31105== ==31105== Process terminating with default action of signal 5 (SIGTRAP) ==31105== at 0x7CE381B: _g_log_abort (gmessages.c:324) ==31105== by 0x7CE381B: g_logv (gmessages.c:1081) ==31105== by 0x7CE398E: g_log (gmessages.c:1119) ==31105== by 0x172479: _nm_log_impl (nm-logging.c:591) ==31105== by 0x166AE3: _netns_switch (nmp-netns.c:248) ==31105== by 0x167D05: nmp_netns_pop (nmp-netns.c:387) ==31105== by 0x13B18F: test_netns_general (test-link.c:1882) ==31105== by 0x7D0245A: test_case_run (gtestutils.c:2158) ==31105== by 0x7D0245A: g_test_run_suite_internal (gtestutils.c:2241) ==31105== by 0x7D02622: g_test_run_suite_internal (gtestutils.c:2253) ==31105== by 0x7D02622: g_test_run_suite_internal (gtestutils.c:2253) ==31105== by 0x7D0282D: g_test_run_suite (gtestutils.c:2328) ==31105== by 0x7D02850: g_test_run (gtestutils.c:1596) ==31105== by 0x1667A9: main (test-common.c:1568) and it seems this cannot be suppressed.
Something noteworthy is how to handle udev. For now, there is use_udev = (nmp_netns_get_initial () == nmp_netns_get_current ()) && nmp_cache_use_udev_detect (); and + /* Set up udev monitoring */ + if (priv->udev_client) { + GUdevEnumerator *enumerator; Note that currently the new code is basically disabled by NM_PLATFORM_NETNS_SUPPORT setting. I'd still merge it early, and use the code later. IMO adding netns support is something what we want to do, so I'd be fine with merging parts early without waiting for the full solution.
Looks good to me.
merged to master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=b2b73809c5e2e9422b4e19716284a8b969832a3e