summaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorFan Du <fdu@windriver.com>2012-07-30 21:43:54 +0000
committerDavid S. Miller <davem@davemloft.net>2012-08-02 00:19:17 -0700
commite3c0d04750751389d5116267f8cf4687444d9a50 (patch)
treedfa831b0d4fc388da81ccc0f8f3ce4f62c3916f4 /include/net/xfrm.h
parent1485348d2424e1131ea42efc033cbd9366462b01 (diff)
downloadblackbird-op-linux-e3c0d04750751389d5116267f8cf4687444d9a50.tar.gz
blackbird-op-linux-e3c0d04750751389d5116267f8cf4687444d9a50.zip
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/net/xfrm.h')
-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 {
struct xfrm_lifetime_cur curlft;
struct tasklet_hrtimer mtimer;
+ /* used to fix curlft->add_time when changing date */
+ long saved_tmo;
+
/* Last used time */
unsigned long lastused;
@@ -238,6 +241,7 @@ static inline struct net *xs_net(struct xfrm_state *x)
/* xflags - make enum if more show up */
#define XFRM_TIME_DEFER 1
+#define XFRM_SOFT_EXPIRE 2
enum {
XFRM_STATE_VOID,
OpenPOWER on IntegriCloud