From: Changli Gao Date: Fri, 23 Jul 2010 14:24:34 +0000 (+0200) Subject: netfilter: ip6tables: use skb->len for accounting X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=261abc8c964e018256c1bcbd99b8a208c624d7cc;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git netfilter: ip6tables: use skb->len for accounting ipv6_hdr(skb)->payload_len is ZERO and can't be used for accounting, if the payload is a Jumbo Payload specified in RFC2675. Signed-off-by: Changli Gao Signed-off-by: Patrick McHardy --- diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index dc41d6d3c6c..33113c1ea02 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c @@ -387,9 +387,7 @@ ip6t_do_table(struct sk_buff *skb, goto no_match; } - ADD_COUNTER(e->counters, - ntohs(ipv6_hdr(skb)->payload_len) + - sizeof(struct ipv6hdr), 1); + ADD_COUNTER(e->counters, skb->len, 1); t = ip6t_get_target_c(e); IP_NF_ASSERT(t->u.kernel.target);