Commit | Line | Data |
---|---|---|
d2912cb1 | 1 | // SPDX-License-Identifier: GPL-2.0-only |
bcae6d5f | 2 | /* Accounting handling for netfilter. */ |
58401572 KPO |
3 | |
4 | /* | |
5 | * (C) 2008 Krzysztof Piotr Oledzki <ole@ans.pl> | |
58401572 KPO |
6 | */ |
7 | ||
5191d70f AS |
8 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
9 | ||
58401572 | 10 | #include <linux/netfilter.h> |
5a0e3ad6 | 11 | #include <linux/slab.h> |
58401572 KPO |
12 | #include <linux/kernel.h> |
13 | #include <linux/moduleparam.h> | |
bc3b2d7f | 14 | #include <linux/export.h> |
58401572 KPO |
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 | ||
eb939922 | 20 | static bool nf_ct_acct __read_mostly; |
58401572 KPO |
21 | |
22 | module_param_named(acct, nf_ct_acct, bool, 0644); | |
23 | MODULE_PARM_DESC(acct, "Enable connection tracking flow accounting."); | |
24 | ||
fc3893fd | 25 | void nf_conntrack_acct_pernet_init(struct net *net) |
d716a4df | 26 | { |
d716a4df | 27 | net->ct.sysctl_acct = nf_ct_acct; |
b7ff3a1f | 28 | } |