mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
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>
This commit is contained in:
parent
2452a99dc0
commit
6661481d5a
1 changed files with 1 additions and 2 deletions
|
@ -966,8 +966,7 @@ void __nf_ct_refresh_acct(struct nf_conn *ct,
|
||||||
if (acct) {
|
if (acct) {
|
||||||
spin_lock_bh(&ct->lock);
|
spin_lock_bh(&ct->lock);
|
||||||
acct[CTINFO2DIR(ctinfo)].packets++;
|
acct[CTINFO2DIR(ctinfo)].packets++;
|
||||||
acct[CTINFO2DIR(ctinfo)].bytes +=
|
acct[CTINFO2DIR(ctinfo)].bytes += skb->len;
|
||||||
skb->len - skb_network_offset(skb);
|
|
||||||
spin_unlock_bh(&ct->lock);
|
spin_unlock_bh(&ct->lock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue