diff options
author | Changli Gao <xiaosuo@gmail.com> | 2010-08-02 17:56:28 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-08-02 17:56:28 +0200 |
commit | 6661481d5a8975657742c7ed40ae16bdaa7d0a6e (patch) | |
tree | baa2e3cd57259be6320e506b1d664224da2313ed /net | |
parent | 2452a99dc0496a90abd0090c280671370c0f3e1c (diff) | |
download | talos-op-linux-6661481d5a8975657742c7ed40ae16bdaa7d0a6e.tar.gz talos-op-linux-6661481d5a8975657742c7ed40ae16bdaa7d0a6e.zip |
netfilter: nf_conntrack_acct: use skb->len for accounting
use skb->len for accounting as xt_quota does. Since nf_conntrack works
at the network layer, skb_network_offset should always returns ZERO.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 16b41b4e2a3c..df3eedb142ff 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -966,8 +966,7 @@ acct: if (acct) { spin_lock_bh(&ct->lock); acct[CTINFO2DIR(ctinfo)].packets++; - acct[CTINFO2DIR(ctinfo)].bytes += - skb->len - skb_network_offset(skb); + acct[CTINFO2DIR(ctinfo)].bytes += skb->len; spin_unlock_bh(&ct->lock); } } |