]> git.ipfire.org Git - thirdparty/lxc.git/commit
network: move phys netdevs back to monitor's net ns rather than pid 1's 3005/head
authorThomas Parrott <thomas.parrott@canonical.com>
Wed, 15 May 2019 14:54:12 +0000 (15:54 +0100)
committerThomas Parrott <thomas.parrott@canonical.com>
Wed, 15 May 2019 14:58:46 +0000 (15:58 +0100)
commit0037ab49d61e150e2cb5a93b8a0194d4f2687065
treec30852a459ac8fcfeda0805431419dc81f535ee7
parent7aea50feb954bdd2097d7bf8a252fb13878fe0b4
network: move phys netdevs back to monitor's net ns rather than pid 1's

Updates lxc_restore_phys_nics_to_netns() to move phys netdevs back to the monitor's network namespace rather than the previously hardcoded PID 1 net ns.

This is to fix instances where LXC is started inside a net ns different from PID 1 and physical devices are moved back to a different net ns when the container is shutdown than the net ns than where the container was started from.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
src/lxc/macro.h
src/lxc/network.c