]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/start.c
lxc: manually move NICs back to host after container stops
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Fri, 7 Mar 2014 18:24:27 +0000 (12:24 -0600)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 7 Mar 2014 19:28:38 +0000 (14:28 -0500)
commit2af6bd1bdcc4976517cbd3e73539cf887009aa0d
tree35d215ed6edc00d2b72a7e427fdc0ce58aa60dbc
parent9f4f402a0ea27e4c66dc868ab3716eaeccaff461
lxc: manually move NICs back to host after container stops

This prevents things like bridges from being destroyed by the kernel.

My hope is that just doing this will be enough to also ensure that
the device will be available to be renamed immediately, so that
we don't need to do a retry loop.

Tested with a dummy device.  renaming dummy0 to dummy5 in container,
then shutting down container, returns dummy0 to the host.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/conf.c
src/lxc/conf.h
src/lxc/start.c