libipsec: Properly handle expiration if no lifetime is set
authorTobias Brunner <tobias@strongswan.org>
Mon, 1 Jul 2013 11:47:11 +0000 (13:47 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 1 Jul 2013 11:48:02 +0000 (13:48 +0200)
src/libipsec/ipsec_sa_mgr.c

index 1f5d5a3..928a53d 100644 (file)
@@ -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,