public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PATCH: ipfwadm IP accounting (2.4.1)
@ 2001-02-06 12:38 Eric Berenguier
  2001-02-07  3:37 ` Rusty Russell
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Berenguier @ 2001-02-06 12:38 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 417 bytes --]

Hello,


Using ipfwadm on a 2.4.1 kernel, some ip accouting rules for outgoing
packets have theirs packet and byte counter stuck to 0 value. There is no
such problem with incoming packets.

For example try this one: ipfwadm -A out -a -W eth0 -S 0/0 -D 0/0

The included patch solves this problem (this was probably a typo).
I've only tested it with ipfwadm and with simple rules like the one above.


Eric Berenguier

[-- Attachment #2: 2.4.1_ipfwadm_ip_acct_out_patch --]
[-- Type: text/plain, Size: 433 bytes --]

--- linux-2.4.1/net/ipv4/netfilter/ip_fw_compat.c	Tue Feb  6 11:10:01
2001
+++ linux/net/ipv4/netfilter/ip_fw_compat.c	Tue Feb  6 09:03:17 2001
@@ -132,7 +132,7 @@
 		if (ret == FW_ACCEPT || ret == FW_SKIP) {
 			if (fwops->fw_acct_out)
 				fwops->fw_acct_out(fwops, PF_INET,
-						   (struct net_device *)in,
+						   (struct net_device *)out,
 						   (*pskb)->nh.raw, &redirpt,
 						   pskb);
 			confirm_connection(*pskb);

[-- Attachment #3: Type: text/plain, Size: 360 bytes --]

--
Eric Berenguier

-----------------------------------------------------------------
                    SYCOMORE Groupe EADS
63 Ter, Av. Edouard Vaillant - 92517 Boulogne-Billancourt Cedex
  Tel. : +33 (0)1 46 08 61 55 - Fax : +33 (0)1 46 08 63 19
                    http://www.sycomore.fr
-----------------------------------------------------------------


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

end of thread, other threads:[~2001-02-07  3:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-06 12:38 PATCH: ipfwadm IP accounting (2.4.1) Eric Berenguier
2001-02-07  3:37 ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox