From: Tobias Brunner Date: Mon, 1 Jul 2013 11:47:11 +0000 (+0200) Subject: libipsec: Properly handle expiration if no lifetime is set X-Git-Tag: 5.1.0dr1~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=91c9bf1872c700eedbe1ba1b8f55b2169feee03e;p=thirdparty%2Fstrongswan.git libipsec: Properly handle expiration if no lifetime is set --- diff --git a/src/libipsec/ipsec_sa_mgr.c b/src/libipsec/ipsec_sa_mgr.c index 1f5d5a3b3d..928a53d50c 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,