summaryrefslogtreecommitdiff
path: root/net/netfilter/xt_connbytes.c
diff options
context:
space:
mode:
authorHolger Eitzenberger <holger@eitzenberger.org>2013-09-26 17:31:51 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-11-03 21:48:49 +0100
commitf7b13e4330ef3c20e62ac4908cc96c1c318056c2 (patch)
tree87e26698a11080e734c7993f40a85998b1290aa9 /net/netfilter/xt_connbytes.c
parent97203abe6bc41ee020f37c902bd1a761157f22c1 (diff)
netfilter: introduce nf_conn_acct structure
Encapsulate counters for both directions into nf_conn_acct. During that process also consistently name pointers to the extend 'acct', not 'counters'. This patch is a cleanup. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/xt_connbytes.c')
-rw-r--r--net/netfilter/xt_connbytes.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/netfilter/xt_connbytes.c b/net/netfilter/xt_connbytes.c
index e595e07a759b..1e634615ab9d 100644
--- a/net/netfilter/xt_connbytes.c
+++ b/net/netfilter/xt_connbytes.c
@@ -26,16 +26,18 @@ connbytes_mt(const struct sk_buff *skb, struct xt_action_param *par)
u_int64_t what = 0; /* initialize to make gcc happy */
u_int64_t bytes = 0;
u_int64_t pkts = 0;
+ const struct nf_conn_acct *acct;
const struct nf_conn_counter *counters;
ct = nf_ct_get(skb, &ctinfo);
if (!ct)
return false;
- counters = nf_conn_acct_find(ct);
- if (!counters)
+ acct = nf_conn_acct_find(ct);
+ if (!acct)
return false;
+ counters = acct->counter;
switch (sinfo->what) {
case XT_CONNBYTES_PKTS:
switch (sinfo->direction) {