mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 03:38:47 +00:00
don't run lxc-user-nic for empty netns
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
2b142295af
commit
b8f475c017
@ -3036,15 +3036,15 @@ 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 (!am_root) {
|
||||
if (unpriv_assign_nic(netdev, pid))
|
||||
return -1;
|
||||
// TODO fill in netdev->ifindex and name
|
||||
continue;
|
||||
}
|
||||
/* empty network namespace, nothing to move */
|
||||
if (!netdev->ifindex)
|
||||
continue;
|
||||
|
||||
err = lxc_netdev_move_by_index(netdev->ifindex, pid);
|
||||
if (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user