4 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
5 #include <linux/module.h>
6 #include <linux/bitops.h>
9 #include <linux/netfilter/x_tables.h>
31 ct = nf_ct_get(skb, &ctinfo);
35 counters = nf_conn_acct_find(ct);
39 switch (sinfo->
what) {
86 what = div64_u64(bytes, pkts);
91 return what <= sinfo->
count.to && what >= sinfo->
count.from;
93 return what < sinfo->
count.to || what > sinfo->
count.from;
113 pr_info(
"cannot load conntrack support for proto=%u\n",
120 if (!nf_ct_acct_enabled(par->
net)) {
121 pr_warning(
"Forcing CT accounting to be enabled\n");
122 nf_ct_set_acct(par->
net,
true);
137 .checkentry = connbytes_mt_check,
138 .match = connbytes_mt,
139 .destroy = connbytes_mt_destroy,
144 static int __init connbytes_mt_init(
void)
149 static void __exit connbytes_mt_exit(
void)