]> git.ipfire.org Git - thirdparty/lxc.git/commit
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 22:27:04 +0000 (17:27 -0500)
commit48fd6371c6148278202041642582d009ecd3f94f
treeb9db43a8198579ac900df0d581bd3de6e19e5ed4
parent5fa1281528230aa9da155278fdeb223e7155bf85
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