]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETFILTER]: nf_conntrack: fix accounting with fixed timeouts
authorPatrick McHardy <kaber@trash.net>
Thu, 31 Jan 2008 12:36:31 +0000 (04:36 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Feb 2008 03:27:51 +0000 (19:27 -0800)
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>
net/netfilter/nf_conntrack_core.c

index 7b1f7e80f2f877a485c0ebd40a96af0f97571f5d..aa042c489685024de9835235e339f891bbb68594 100644 (file)
@@ -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++;