Unverified Commit 065d331a by Stéphane Graber Committed by GitHub

Merge pull request #3589 from tych0/fix-nonet-cleanup

network: fix LXC_NET_NONE cleanup
parents 55f7e4d6 04213960
......@@ -3605,6 +3605,13 @@ int lxc_restore_phys_nics_to_netns(struct lxc_handler *handler)
char ifname[IFNAMSIZ];
struct lxc_list *iterator;
/*
* If we weren't asked to clone a new network namespace, there's
* nothing to restore.
*/
if (!(handler->ns_clone_flags & CLONE_NEWNET))
return 0;
/* We need CAP_NET_ADMIN in the parent namespace in order to setns() to
* the parent network namespace. We won't have this capability if we are
* unprivileged.
......
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