Commit 236087a6 by Daniel Lezcano Committed by Daniel Lezcano

fix empty network namespace

When there is an empty network namespace, we must not move the network device. Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 90b59fd0
......@@ -1265,6 +1265,10 @@ int lxc_assign_network(struct lxc_list *network, pid_t pid)
netdev = iterator->elem;
/* empty network namespace, nothing to move */
if (!netdev->ifindex)
continue;
if (lxc_device_move(netdev->ifindex, pid)) {
ERROR("failed to move '%s' to the container",
netdev->link);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment