jobs: Don't execute rekey CHILD_SA job on passive IKE_SAs
authorThomas Egerer <thomas.egerer@secunet.com>
Fri, 24 Apr 2015 11:43:14 +0000 (13:43 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 4 Aug 2015 09:16:13 +0000 (11:16 +0200)
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
src/libcharon/processing/jobs/rekey_child_sa_job.c

index 8f17d39..057876b 100644 (file)
@@ -67,7 +67,10 @@ METHOD(job_t, execute, job_requeue_t,
        }
        else
        {
-               ike_sa->rekey_child_sa(ike_sa, this->protocol, this->spi);
+               if (ike_sa->get_state(ike_sa) != IKE_PASSIVE)
+               {
+                       ike_sa->rekey_child_sa(ike_sa, this->protocol, this->spi);
+               }
                charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
        }
        return JOB_REQUEUE_NONE;