aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorYury Polyanskiy <polyanskiy@gmail.com>2009-11-08 23:58:41 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-08 23:58:41 -0500
commit9e0d57fd6dad37d72a3ca6db00ca8c76f2215454 (patch)
tree89693eb2e093da06e2228c12b43bde23e95049ad /include/net/xfrm.h
parent7a50a240c495478179f01c9df4bd75e39cff79c7 (diff)
xfrm: SAD entries do not expire correctly after suspend-resume
This fixes the following bug in the current implementation of net/xfrm: SAD entries timeouts do not count the time spent by the machine in the suspended state. This leads to the connectivity problems because after resuming local machine thinks that the SAD entry is still valid, while it has already been expired on the remote server. The cause of this is very simple: the timeouts in the net/xfrm are bound to the old mod_timer() timers. This patch reassigns them to the CLOCK_REALTIME hrtimer. I have been using this version of the patch for a few months on my machines without any problems. Also run a few stress tests w/o any issues. This version of the patch uses tasklet_hrtimer by Peter Zijlstra (commit 9ba5f0). This patch is against 2.6.31.4. Please CC me. Signed-off-by: Yury Polyanskiy <polyanskiy@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 7f38ef509957..93d184b91a8c 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -19,6 +19,9 @@
19#include <net/route.h> 19#include <net/route.h>
20#include <net/ipv6.h> 20#include <net/ipv6.h>
21#include <net/ip6_fib.h> 21#include <net/ip6_fib.h>
22
23#include <linux/interrupt.h>
24
22#ifdef CONFIG_XFRM_STATISTICS 25#ifdef CONFIG_XFRM_STATISTICS
23#include <net/snmp.h> 26#include <net/snmp.h>
24#endif 27#endif
@@ -198,7 +201,7 @@ struct xfrm_state {
198 struct xfrm_stats stats; 201 struct xfrm_stats stats;
199 202
200 struct xfrm_lifetime_cur curlft; 203 struct xfrm_lifetime_cur curlft;
201 struct timer_list timer; 204 struct tasklet_hrtimer mtimer;
202 205
203 /* Last used time */ 206 /* Last used time */
204 unsigned long lastused; 207 unsigned long lastused;