aboutsummaryrefslogtreecommitdiffstats
path: root/src/libipsec
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-07-01 13:47:11 +0200
committerTobias Brunner <tobias@strongswan.org>2013-07-01 13:48:02 +0200
commit91c9bf1872c700eedbe1ba1b8f55b2169feee03e (patch)
treed61803ce46b3bbcc2232d15562605f3d4143a952 /src/libipsec
parentf588349dfef023c0f46ab59ad0180efdaa6aba19 (diff)
downloadstrongswan-91c9bf1872c700eedbe1ba1b8f55b2169feee03e.tar.bz2
strongswan-91c9bf1872c700eedbe1ba1b8f55b2169feee03e.tar.xz
libipsec: Properly handle expiration if no lifetime is set
Diffstat (limited to 'src/libipsec')
-rw-r--r--src/libipsec/ipsec_sa_mgr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libipsec/ipsec_sa_mgr.c b/src/libipsec/ipsec_sa_mgr.c
index 1f5d5a3b3..928a53d50 100644
--- a/src/libipsec/ipsec_sa_mgr.c
+++ b/src/libipsec/ipsec_sa_mgr.c
@@ -332,6 +332,11 @@ static void schedule_expiration(private_ipsec_sa_mgr_t *this,
callback_job_t *job;
u_int32_t timeout;
+ if (!lifetime->time.life)
+ { /* no expiration at all */
+ return;
+ }
+
INIT(expired,
.manager = this,
.entry = entry,