diff options
author | Tinggong Wang <wangtinggong@gmail.com> | 2011-02-08 19:21:59 -0500 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2011-02-15 17:00:02 -0500 |
commit | 16a7fd323f93eab88df79fc647575ae9789037c2 (patch) | |
tree | f691935263f8f3e77071016924f15aac1e82ce4a /net | |
parent | 8248779b1878f17cce2bb809831f4f2a252bdb77 (diff) |
ipvs: fix timer in get_curr_sync_buff
Fix get_curr_sync_buff to keep buffer for 2 seconds
as intended, not just for the current jiffie. By this way
we will sync more connection structures with single packet.
Signed-off-by: Tinggong Wang <wangtinggong@gmail.com>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index d1b7298e5894..fecf24de4af3 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c | |||
@@ -374,8 +374,8 @@ get_curr_sync_buff(struct netns_ipvs *ipvs, unsigned long time) | |||
374 | struct ip_vs_sync_buff *sb; | 374 | struct ip_vs_sync_buff *sb; |
375 | 375 | ||
376 | spin_lock_bh(&ipvs->sync_buff_lock); | 376 | spin_lock_bh(&ipvs->sync_buff_lock); |
377 | if (ipvs->sync_buff && (time == 0 || | 377 | if (ipvs->sync_buff && |
378 | time_before(jiffies - ipvs->sync_buff->firstuse, time))) { | 378 | time_after_eq(jiffies - ipvs->sync_buff->firstuse, time)) { |
379 | sb = ipvs->sync_buff; | 379 | sb = ipvs->sync_buff; |
380 | ipvs->sync_buff = NULL; | 380 | ipvs->sync_buff = NULL; |
381 | } else | 381 | } else |