Skip to content

Commit

Permalink
netfilter: iptables: use skb->len for accounting
Browse files Browse the repository at this point in the history
Use skb->len for accounting as xt_quota does.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Changli Gao authored and Patrick McHardy committed Jul 23, 2010
1 parent 261abc8 commit 7df0884
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ip_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7df0884

Please sign in to comment.