aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-01-31 07:36:31 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-31 22:27:51 -0500
commit47d9504543817b0aa908a37a335b90c30704a100 (patch)
tree09718fcb2485e82b2151bcfa4621fa83b8367cbf
parent1d670fdc8c14780b8e0ad915ad3bb13b2fd9223b (diff)
[NETFILTER]: nf_conntrack: fix accounting with fixed timeouts
Don't skip accounting for conntracks with the FIXED_TIMEOUT bit. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/netfilter/nf_conntrack_core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 7b1f7e80f2f8..aa042c489685 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -776,10 +776,8 @@ void __nf_ct_refresh_acct(struct nf_conn *ct,
776 write_lock_bh(&nf_conntrack_lock); 776 write_lock_bh(&nf_conntrack_lock);
777 777
778 /* Only update if this is not a fixed timeout */ 778 /* Only update if this is not a fixed timeout */
779 if (test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status)) { 779 if (test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status))
780 write_unlock_bh(&nf_conntrack_lock); 780 goto acct;
781 return;
782 }
783 781
784 /* If not in hash table, timer will not be active yet */ 782 /* If not in hash table, timer will not be active yet */
785 if (!nf_ct_is_confirmed(ct)) { 783 if (!nf_ct_is_confirmed(ct)) {
@@ -799,6 +797,7 @@ void __nf_ct_refresh_acct(struct nf_conn *ct,
799 } 797 }
800 } 798 }
801 799
800acct:
802#ifdef CONFIG_NF_CT_ACCT 801#ifdef CONFIG_NF_CT_ACCT
803 if (do_acct) { 802 if (do_acct) {
804 ct->counters[CTINFO2DIR(ctinfo)].packets++; 803 ct->counters[CTINFO2DIR(ctinfo)].packets++;