From: Changli Gao Date: Fri, 23 Jul 2010 14:25:11 +0000 (+0200) Subject: netfilter: iptables: use skb->len for accounting X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7df0884ce144396fc151f2af7a73d5fb305f9b03;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git netfilter: iptables: use skb->len for accounting Use skb->len for accounting as xt_quota does. Signed-off-by: Changli Gao Signed-off-by: Patrick McHardy --- diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index b38c11810c6..3c584a6765b 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c @@ -364,7 +364,7 @@ ipt_do_table(struct sk_buff *skb, goto no_match; } - ADD_COUNTER(e->counters, ntohs(ip->tot_len), 1); + ADD_COUNTER(e->counters, skb->len, 1); t = ipt_get_target(e); IP_NF_ASSERT(t->u.kernel.target);