Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tinggong Wang and committed by
Simon Horman
16a7fd32 8248779b

+2 -2
+2 -2
net/netfilter/ipvs/ip_vs_sync.c
··· 374 374 struct ip_vs_sync_buff *sb; 375 375 376 376 spin_lock_bh(&ipvs->sync_buff_lock); 377 - if (ipvs->sync_buff && (time == 0 || 378 - time_before(jiffies - ipvs->sync_buff->firstuse, time))) { 377 + if (ipvs->sync_buff && 378 + time_after_eq(jiffies - ipvs->sync_buff->firstuse, time)) { 379 379 sb = ipvs->sync_buff; 380 380 ipvs->sync_buff = NULL; 381 381 } else