Skip to content

Commit 478553f

Browse files
Florian Westphalummakynes
authored andcommitted
netfilter: conntrack: make sysctls per-namespace again
When I merged the extension sysctl tables with the main one I forgot to reset them on netns creation. They currently read/write init_net settings. Fixes: d912dec ("netfilter: conntrack: merge acct and helper sysctl table with main one") Fixes: cb2833e ("netfilter: conntrack: merge ecache and timestamp sysctl tables with main one") Reported-by: Shmulik Ladkani <[email protected]> Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 3a06902 commit 478553f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

net/netfilter/nf_conntrack_standalone.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,13 @@ static int nf_conntrack_standalone_init_sysctl(struct net *net)
10371037
table[NF_SYSCTL_CT_COUNT].data = &net->ct.count;
10381038
table[NF_SYSCTL_CT_CHECKSUM].data = &net->ct.sysctl_checksum;
10391039
table[NF_SYSCTL_CT_LOG_INVALID].data = &net->ct.sysctl_log_invalid;
1040+
table[NF_SYSCTL_CT_ACCT].data = &net->ct.sysctl_acct;
1041+
table[NF_SYSCTL_CT_HELPER].data = &net->ct.sysctl_auto_assign_helper;
10401042
#ifdef CONFIG_NF_CONNTRACK_EVENTS
10411043
table[NF_SYSCTL_CT_EVENTS].data = &net->ct.sysctl_events;
1044+
#endif
1045+
#ifdef CONFIG_NF_CONNTRACK_TIMESTAMP
1046+
table[NF_SYSCTL_CT_TIMESTAMP].data = &net->ct.sysctl_tstamp;
10421047
#endif
10431048
table[NF_SYSCTL_CT_PROTO_TIMEOUT_GENERIC].data = &nf_generic_pernet(net)->timeout;
10441049
table[NF_SYSCTL_CT_PROTO_TIMEOUT_ICMP].data = &nf_icmp_pernet(net)->timeout;

0 commit comments

Comments
 (0)