aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFan Du <fdu@windriver.com>2012-07-30 17:43:54 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-02 03:19:17 -0400
commite3c0d04750751389d5116267f8cf4687444d9a50 (patch)
treedfa831b0d4fc388da81ccc0f8f3ce4f62c3916f4 /include
parent1485348d2424e1131ea42efc033cbd9366462b01 (diff)
Fix unexpected SA hard expiration after changing date
After SA is setup, one timer is armed to detect soft/hard expiration, however the timer handler uses xtime to do the math. This makes hard expiration occurs first before soft expiration after setting new date with big interval. As a result new child SA is deleted before rekeying the new one. Signed-off-by: Fan Du <fdu@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/xfrm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index d9509eb29b80..62b619e82a90 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -213,6 +213,9 @@ struct xfrm_state {
213 struct xfrm_lifetime_cur curlft; 213 struct xfrm_lifetime_cur curlft;
214 struct tasklet_hrtimer mtimer; 214 struct tasklet_hrtimer mtimer;
215 215
216 /* used to fix curlft->add_time when changing date */
217 long saved_tmo;
218
216 /* Last used time */ 219 /* Last used time */
217 unsigned long lastused; 220 unsigned long lastused;
218 221
@@ -238,6 +241,7 @@ static inline struct net *xs_net(struct xfrm_state *x)
238 241
239/* xflags - make enum if more show up */ 242/* xflags - make enum if more show up */
240#define XFRM_TIME_DEFER 1 243#define XFRM_TIME_DEFER 1
244#define XFRM_SOFT_EXPIRE 2
241 245
242enum { 246enum {
243 XFRM_STATE_VOID, 247 XFRM_STATE_VOID,