From: Changli Gao Date: Mon, 2 Aug 2010 15:56:28 +0000 (+0200) Subject: netfilter: nf_conntrack_acct: use skb->len for accounting X-Git-Tag: v2.6.36-rc1~571^2~46^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=6661481d5a8975657742c7ed40ae16bdaa7d0a6e;p=linux.git 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 Signed-off-by: Patrick McHardy --- 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 @@ void __nf_ct_refresh_acct(struct nf_conn *ct, 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); } }