From 91c9bf1872c700eedbe1ba1b8f55b2169feee03e Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Mon, 1 Jul 2013 13:47:11 +0200 Subject: [PATCH] libipsec: Properly handle expiration if no lifetime is set --- src/libipsec/ipsec_sa_mgr.c | 5 +++++ 1 file changed, 5 insertions(+) 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,