Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41920
b: refs/heads/master
c: be00c8e
h: refs/heads/master
v: v3
  • Loading branch information
Martin Josefsson authored and David S. Miller committed Dec 3, 2006
1 parent 0fe4f61 commit 1249023
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 824621eddd2087b0e6f0b2e0da91e8d77e4919bf
refs/heads/master: be00c8e48993368663e2714bd1e7c886b7736406
11 changes: 8 additions & 3 deletions trunk/net/netfilter/nf_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,9 +864,14 @@ void __nf_ct_refresh_acct(struct nf_conn *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;
unsigned long newtime = jiffies + extra_jiffies;

/* Only update the timeout if the new timeout is at least
HZ jiffies from the old timeout. Need del_timer for race
avoidance (may already be dying). */
if (newtime - ct->timeout.expires >= HZ
&& del_timer(&ct->timeout)) {
ct->timeout.expires = newtime;
add_timer(&ct->timeout);
event = IPCT_REFRESH;
}
Expand Down

0 comments on commit 1249023

Please sign in to comment.