nufw-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nufw-devel] Re: [PATCH 1/3] [kernel patch] fixed duration connection


From: Patrick McHardy
Subject: [Nufw-devel] Re: [PATCH 1/3] [kernel patch] fixed duration connection
Date: Tue, 11 Apr 2006 18:22:46 +0200
User-agent: Debian Thunderbird 1.0.7 (X11/20051019)

Eric Leblond wrote:
> I followed your recommendation and here's the patch.

Seems you missed one in the noise :)

------------------------------------------------------------------------

diff --git a/net/ipv4/netfilter/ip_conntrack_core.c
b/net/ipv4/netfilter/ip_conntrack_core.c
index ceaabc1..d9dbe0f 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -1130,18 +1130,21 @@ void __ip_ct_refresh_acct(struct ip_conn

        write_lock_bh(&ip_conntrack_lock);
-------
Please just do:
        if (test_bit(...))
                return;
-------

-       /* If not in hash table, timer will not be active yet */
-       if (!is_confirmed(ct)) {
-               ct->timeout.expires = extra_jiffies;
-               event = IPCT_REFRESH;
-       } else {
-               /* Need del_timer for race avoidance (may already be dying). */
-               if (del_timer(&ct->timeout)) {
-                       ct->timeout.expires = jiffies + extra_jiffies;
-                       add_timer(&ct->timeout);
-                       event = IPCT_REFRESH;
-               }
-       }
+    /* only update if this is not a fixed timeout */
+    if (! test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status)){
+        /* If not in hash table, timer will not be active yet */
+        if (!is_confirmed(ct)) {
+            ct->timeout.expires = extra_jiffies;
+            event = IPCT_REFRESH;
+        } else {
+            /* Need del_timer for race avoidance (may already be dying). */
+            if (del_timer(&ct->timeout)) {
+                ct->timeout.expires = jiffies + extra_jiffies;
+                add_timer(&ct->timeout);
+                event = IPCT_REFRESH;
+            }
+        }
+    }

 #ifdef CONFIG_IP_NF_CT_ACCT
        if (do_acct) {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]