summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2010-07-23 16:24:34 +0200
committerPatrick McHardy <kaber@trash.net>2010-07-23 16:24:34 +0200
commit261abc8c964e018256c1bcbd99b8a208c624d7cc (patch)
treec98dd4640e000fe0fa0f4bbc57d8db92d88c492a /net/ipv6
parent49daf6a22622d4e1619aeaad5f9f0472bf89daff (diff)
downloadop-kernel-dev-261abc8c964e018256c1bcbd99b8a208c624d7cc.zip
op-kernel-dev-261abc8c964e018256c1bcbd99b8a208c624d7cc.tar.gz
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 <xiaosuo@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6_tables.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index dc41d6d..33113c1 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);
OpenPOWER on IntegriCloud