]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
netfilter: iptables: use skb->len for accounting
authorChangli Gao <xiaosuo@gmail.com>
Fri, 23 Jul 2010 14:25:11 +0000 (16:25 +0200)
committerPatrick McHardy <kaber@trash.net>
Fri, 23 Jul 2010 14:25:11 +0000 (16:25 +0200)
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>
net/ipv4/netfilter/ip_tables.c

index b38c11810c65938513282a9e8a0699317dad231a..3c584a6765b07b49d755b83eb2dfce436c08b101 100644 (file)
@@ -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);