From abd953eb5120b8a5fd4c97634ba01305ec6e1f3b Mon Sep 17 00:00:00 2001 From: Blair Steven Date: Wed, 9 Dec 2020 11:23:39 +1300 Subject: [PATCH] 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 --- src/lxc/start.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.47.2