Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=47d9504543817b0aa908a37a335b90c30704a100
Commit:     47d9504543817b0aa908a37a335b90c30704a100
Parent:     1d670fdc8c14780b8e0ad915ad3bb13b2fd9223b
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 31 04:36:31 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Jan 31 19:27:51 2008 -0800

    [NETFILTER]: nf_conntrack: fix accounting with fixed timeouts
    
    Don't skip accounting for conntracks with the FIXED_TIMEOUT bit.
    
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/netfilter/nf_conntrack_core.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/net/netfilter/nf_conntrack_core.c 
b/net/netfilter/nf_conntrack_core.c
index 7b1f7e8..aa042c4 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,
        write_lock_bh(&nf_conntrack_lock);
 
        /* Only update if this is not a fixed timeout */
-       if (test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status)) {
-               write_unlock_bh(&nf_conntrack_lock);
-               return;
-       }
+       if (test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status))
+               goto acct;
 
        /* If not in hash table, timer will not be active yet */
        if (!nf_ct_is_confirmed(ct)) {
@@ -799,6 +797,7 @@ void __nf_ct_refresh_acct(struct nf_conn *ct,
                }
        }
 
+acct:
 #ifdef CONFIG_NF_CT_ACCT
        if (do_acct) {
                ct->counters[CTINFO2DIR(ctinfo)].packets++;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to