]> git.proxmox.com Git - mirror_lxc.git/commit
conf: merge network namespace move & rename on shutdown
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 17 Aug 2016 09:36:39 +0000 (11:36 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 2 Nov 2016 13:59:44 +0000 (14:59 +0100)
commit5610055a113f46a017bad687c40e7570da2a7035
treea95b01a1fe55f5d2d65d1f6c8b9afa4ee6458be7
parent52e129450eae6f916f1e5bf4342f543d07cfb481
conf: merge network namespace move & rename on shutdown

On shutdown we move physical network interfaces back to the
host namespace and rename them afterwards as well as in the
later lxc_network_delete() step. However, if the device had
a name which already exists in the host namespace then the
moving fails and so do the subsequent rename attempts. When
the namespace ceases to exist the devices finally end up
in the host namespace named 'dev<ID>' by the kernel.

In order to avoid this, we do the moving and renaming in a
single step (lxc_netdev_move_by_*()'s move & rename happen
in a single netlink transaction).

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/lxc/conf.c
src/lxc/conf.h
src/lxc/start.c