aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorEric Leblond <eric@inl.fr>2006-05-29 21:24:20 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-18 00:28:59 -0400
commit997ae831ade74bdaed4172b1c02060b9efd6e206 (patch)
treefeca25f5c27c47724ecfbcc66f4f437619fb57ed /net/ipv4
parent39a27a35c5c1b5be499a0576a35c45a011788bf8 (diff)
[NETFILTER]: conntrack: add fixed timeout flag in connection tracking
Add a flag in a connection status to have a non updated timeout. This permits to have connection that automatically die at a given time. Signed-off-by: Eric Leblond <eric@inl.fr> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/ip_conntrack_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
index a297da7bbef5..4fe9e69378df 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -1130,6 +1130,12 @@ void __ip_ct_refresh_acct(struct ip_conntrack *ct,
1130 1130
1131 write_lock_bh(&ip_conntrack_lock); 1131 write_lock_bh(&ip_conntrack_lock);
1132 1132
1133 /* Only update if this is not a fixed timeout */
1134 if (test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status)) {
1135 write_unlock_bh(&ip_conntrack_lock);
1136 return;
1137 }
1138
1133 /* If not in hash table, timer will not be active yet */ 1139 /* If not in hash table, timer will not be active yet */
1134 if (!is_confirmed(ct)) { 1140 if (!is_confirmed(ct)) {
1135 ct->timeout.expires = extra_jiffies; 1141 ct->timeout.expires = extra_jiffies;