Moved CHILD_SA initiate task creation to protocol specific task manager
[strongswan.git] / src / libcharon / sa / ikev2 / task_manager_v2.c
index d28562b..cfc5454 100644 (file)
@@ -1200,6 +1200,20 @@ METHOD(task_manager_t, queue_ike, void,
 #endif /* ME */
 }
 
+METHOD(task_manager_t, queue_child, void,
+       private_task_manager_t *this, child_cfg_t *cfg, u_int32_t reqid,
+       traffic_selector_t *tsi, traffic_selector_t *tsr)
+{
+       child_create_t *task;
+
+       task = child_create_create(this->ike_sa, cfg, FALSE, tsi, tsr);
+       if (reqid)
+       {
+               task->use_reqid(task, reqid);
+       }
+       queue_task(this, &task->task);
+}
+
 METHOD(task_manager_t, queue_dpd, void,
        private_task_manager_t *this)
 {
@@ -1325,6 +1339,7 @@ task_manager_v2_t *task_manager_v2_create(ike_sa_t *ike_sa)
                                .process_message = _process_message,
                                .queue_task = _queue_task,
                                .queue_ike = _queue_ike,
+                               .queue_child = _queue_child,
                                .queue_dpd = _queue_dpd,
                                .initiate = _initiate,
                                .retransmit = _retransmit,