Actually if we're to support l2tp control via VE_FEATURE_PPP we need more than plain bit test but the whole logic converted from pcs6 code (which implies tunnel list and such).
As far as I know we don't have the plans at moment to control l2tp this way so lets rip this code out otherwise there is a net leak (because net_generic with @pppol2tp_net_id always return nil and proc entry never released). Signed-off-by: Cyrill Gorcunov <gorcu...@virtuozzo.com> CC: Vladimir Davydov <vdavy...@virtuozzo.com> CC: Konstantin Khorenko <khore...@virtuozzo.com> --- net/l2tp/l2tp_ppp.c | 9 --------- 1 file changed, 9 deletions(-) Index: linux-pcs7.git/net/l2tp/l2tp_ppp.c =================================================================== --- linux-pcs7.git.orig/net/l2tp/l2tp_ppp.c +++ linux-pcs7.git/net/l2tp/l2tp_ppp.c @@ -1751,9 +1751,6 @@ static __net_init int pppol2tp_init_net( struct proc_dir_entry *pde; int err = 0; - if (!(net->owner_ve->features & VE_FEATURE_PPP)) - return net_assign_generic(net, pppol2tp_net_id, NULL); - pde = proc_create("pppol2tp", S_IRUGO, net->proc_net, &pppol2tp_proc_fops); if (!pde) { @@ -1767,12 +1764,6 @@ out: static __net_exit void pppol2tp_exit_net(struct net *net) { - struct pppoe_net *pn; - - pn = net_generic(net, pppol2tp_net_id); - if (!pn) /* no VE_FEATURE_PPP */ - return; - remove_proc_entry("pppol2tp", net->proc_net); } _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel