Commit 7df0884c authored by Changli Gao's avatar Changli Gao Committed by Patrick McHardy

netfilter: iptables: use skb->len for accounting

Use skb->len for accounting as xt_quota does.
Signed-off-by: default avatarChangli Gao <xiaosuo@gmail.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent 261abc8c
...@@ -364,7 +364,7 @@ ipt_do_table(struct sk_buff *skb, ...@@ -364,7 +364,7 @@ ipt_do_table(struct sk_buff *skb,
goto no_match; goto no_match;
} }
ADD_COUNTER(e->counters, ntohs(ip->tot_len), 1); ADD_COUNTER(e->counters, skb->len, 1);
t = ipt_get_target(e); t = ipt_get_target(e);
IP_NF_ASSERT(t->u.kernel.target); IP_NF_ASSERT(t->u.kernel.target);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment