1 // SPDX-License-Identifier: GPL-2.0-only
2 /* Accounting handling for netfilter. */
3 
4 /*
5  * (C) 2008 Krzysztof Piotr Oledzki <ole@ans.pl>
6  */
7 
8 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
9 
10 #include <linux/netfilter.h>
11 #include <linux/slab.h>
12 #include <linux/kernel.h>
13 #include <linux/moduleparam.h>
14 #include <linux/export.h>
15 
16 #include <net/netfilter/nf_conntrack.h>
17 #include <net/netfilter/nf_conntrack_extend.h>
18 #include <net/netfilter/nf_conntrack_acct.h>
19 
20 static bool nf_ct_acct __read_mostly;
21 
22 module_param_named(acct, nf_ct_acct, bool, 0644);
23 MODULE_PARM_DESC(acct, "Enable connection tracking flow accounting.");
24 
nf_conntrack_acct_pernet_init(struct net * net)25 void nf_conntrack_acct_pernet_init(struct net *net)
26 {
27 	net->ct.sysctl_acct = nf_ct_acct;
28 }
29