The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-123.1.2.el7.ovz.4.8 ------> commit 1808194996b32fa64ea43aef8eceb6da7b17f073 Author: Cyrill Gorcunov <gorcu...@parallels.com> Date: Tue Apr 28 19:00:38 2015 +0400
venet: Dont create venet-s in sub net namespaces (v2) Patch diff-venet-dont-create-venet-s-in-sub-net-namespaces ported from RHEL6-based. Docker don't need venet inteterfaces in sub net namespaces. v2: Don't create venet if ve->netns isn't equal to the current netns https://jira.sw.ru/browse/PSBM-29811 Signed-off-by: Andrew Vagin <ava...@openvz.org> Signed-off-by: Cyrill Gorcunov <gorcu...@gmail.com> Reviewed-by: Vladimir Davydov <vdavy...@odin.com> vdavydov@: this patch fixes 'unshare -n' failing with EEXIST. --- drivers/net/venetdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/venetdev.c b/drivers/net/venetdev.c index 20729d0..d4c3fa9 100644 --- a/drivers/net/venetdev.c +++ b/drivers/net/venetdev.c @@ -1086,6 +1086,11 @@ static __net_init int venet_init_net(struct net *net) int err; env = get_exec_env(); + if (env->ve_netns && net != env->ve_netns) { + /* Don't create venet-s in sub net namespaces */ + return 0; + } + if (env->veip) return -EEXIST; _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel