Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /* Accounting handling for netfilter. */
0003 
0004 /*
0005  * (C) 2008 Krzysztof Piotr Oledzki <ole@ans.pl>
0006  */
0007 
0008 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
0009 
0010 #include <linux/netfilter.h>
0011 #include <linux/slab.h>
0012 #include <linux/kernel.h>
0013 #include <linux/moduleparam.h>
0014 #include <linux/export.h>
0015 
0016 #include <net/netfilter/nf_conntrack.h>
0017 #include <net/netfilter/nf_conntrack_extend.h>
0018 #include <net/netfilter/nf_conntrack_acct.h>
0019 
0020 static bool nf_ct_acct __read_mostly;
0021 
0022 module_param_named(acct, nf_ct_acct, bool, 0644);
0023 MODULE_PARM_DESC(acct, "Enable connection tracking flow accounting.");
0024 
0025 void nf_conntrack_acct_pernet_init(struct net *net)
0026 {
0027     net->ct.sysctl_acct = nf_ct_acct;
0028 }