From: Blair Steven Date: Tue, 8 Dec 2020 22:23:39 +0000 (+1300) Subject: Restore interfaces to the correct namespace on error X-Git-Tag: lxc-5.0.0~331^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3596%2Fhead;p=thirdparty%2Flxc.git Restore interfaces to the correct namespace on error If the container unexpectedly exists we may need to restore physical interfaces back into the main namespace in a tidy way. Signed-off-by: Blair Steven --- diff --git a/src/lxc/start.c b/src/lxc/start.c index 7bf7f8a2f..863ae123b 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -2144,6 +2144,7 @@ out_detach_blockdev: out_delete_network: lxc_abort(handler); + lxc_restore_phys_nics_to_netns(handler); lxc_delete_network(handler); detach_block_device(handler->conf); lxc_end(handler);