[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1279866541.2482.79.camel@edumazet-laptop>
Date: Fri, 23 Jul 2010 08:29:01 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Changli Gao <xiaosuo@...il.com>
Cc: Patrick McHardy <kaber@...sh.net>,
"David S. Miller" <davem@...emloft.net>,
netfilter-devel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] iptables: use skb->len for accounting
Le vendredi 23 juillet 2010 à 11:34 +0800, Changli Gao a écrit :
> iptables: use skb->len for accounting
>
> use skb->len for accounting as xt_quota does.
>
Why ?
This is a gratuitous change, unless you have very strong arguments.
xt_quota is an exception, dont change all others because of it !
It is about actual data on wire, including overhead (excess bytes after
IP frame if any).
But IP tables accounting is about IP only.
> Signed-off-by: Changli Gao <xiaosuo@...il.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);
> --
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists