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-Url: https://git.stricted.de/?a=commitdiff_plain;h=6661481d5a8975657742c7ed40ae16bdaa7d0a6e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 @@ 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); } }