[Devel] [PATCH vz7 4/5] nf_conntrack: expose "nf_conntrack_acct" in contaners

Stanislav Kinsburskiy skinsbursky at odin.com
Tue Oct 6 10:44:58 PDT 2015


From: Stanislav Kinsburskiy <skinsbursky at parallels.com>

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at parallels.com>
---
 net/netfilter/nf_conntrack_acct.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/netfilter/nf_conntrack_acct.c b/net/netfilter/nf_conntrack_acct.c
index 2d3030a..e35af92 100644
--- a/net/netfilter/nf_conntrack_acct.c
+++ b/net/netfilter/nf_conntrack_acct.c
@@ -17,6 +17,7 @@
 #include <net/netfilter/nf_conntrack.h>
 #include <net/netfilter/nf_conntrack_extend.h>
 #include <net/netfilter/nf_conntrack_acct.h>
+#include <net/netfilter/nf_conntrack_core.h>
 
 static bool nf_ct_acct __read_mostly;
 
@@ -70,7 +71,7 @@ static int nf_conntrack_acct_init_sysctl(struct net *net)
 	table[0].data = &net->ct.sysctl_acct;
 
 	/* Don't export sysctls to unprivileged users */
-	if (net->user_ns != &init_user_ns)
+	if (nf_conntrack_hide_sysctl(net))
 		table[0].procname = NULL;
 
 	net->ct.acct_sysctl_header = register_net_sysctl(net, "net/netfilter",




More information about the Devel mailing list