All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iptables: use skb->len for accounting
@ 2010-07-23  3:34 Changli Gao
  2010-07-23  6:29 ` Eric Dumazet
  2010-07-23 14:25 ` Patrick McHardy
  0 siblings, 2 replies; 7+ messages in thread
From: Changli Gao @ 2010-07-23  3:34 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: David S. Miller, netfilter-devel, netdev, Changli Gao

iptables: use skb->len for accounting

use skb->len for accounting as xt_quota does.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 net/ipv4/netfilter/ip_tables.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index b38c118..3c584a6 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -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);

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-07-23 14:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-23  3:34 [PATCH] iptables: use skb->len for accounting Changli Gao
2010-07-23  6:29 ` Eric Dumazet
2010-07-23  6:47   ` Changli Gao
2010-07-23  6:58     ` Eric Dumazet
2010-07-23 11:49       ` Patrick McHardy
2010-07-23 12:14         ` Eric Dumazet
2010-07-23 14:25 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.