Skip to content

Commit

Permalink
netfilter: ip6tables: use skb->len for accounting
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Patrick McHardy <[email protected]>
  • Loading branch information
xiaosuo authored and kaber committed Jul 23, 2010
1 parent 49daf6a commit 261abc8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/ipv6/netfilter/ip6_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 261abc8

Please sign in to comment.