[RHEL7,COMMIT] net: export "net.netfilter.nf_conntrack_helper" sysctl for Container

Submitted by Konstantin Khorenko on Nov. 25, 2019, 3:13 p.m.

Details

Message ID 201911251513.xAPFDRtC013010@finist-ce7.sw.ru
State New
Series "net: export "net.netfilter.nf_conntrack_helper" sysctl for Container"
Headers show

Commit Message

Konstantin Khorenko Nov. 25, 2019, 3:13 p.m.
The commit is pushed to "branch-rh7-3.10.0-1062.4.2.vz7.116.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1062.4.2.vz7.116.5
------>
commit cfbc2e31e7fb6f6c31fc89ae1a6fbaa73b93c1fd
Author: Konstantin Khorenko <khorenko@virtuozzo.com>
Date:   Mon Nov 25 15:22:08 2019 +0300

    net: export "net.netfilter.nf_conntrack_helper" sysctl for Container
    
    firewalld honors it and the sysctl data is stored on "net",
    it's safe to provide it.
    
    https://jira.sw.ru/browse/PSBM-99791
    
    Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 net/netfilter/nf_conntrack_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c
index 8fb71bb42b3b..1f873154023c 100644
--- a/net/netfilter/nf_conntrack_helper.c
+++ b/net/netfilter/nf_conntrack_helper.c
@@ -67,7 +67,7 @@  static int nf_conntrack_helper_init_sysctl(struct net *net)
 	table[0].data = &net->ct.sysctl_auto_assign_helper;
 
 	/* Don't export sysctls to unprivileged users */
-	if (net->user_ns != &init_user_ns)
+	if (ve_net_hide_sysctl(net))
 		table[0].procname = NULL;
 
 	net->ct.helper_sysctl_header =