ike: Reuse interface ID during CHILD_SA rekeyings
[strongswan.git] / src / libcharon / sa / ikev2 / tasks / child_rekey.c
index d5188c0..6b0f427 100644 (file)
@@ -207,6 +207,9 @@ METHOD(task_t, build_i, status_t,
        this->child_create->use_marks(this->child_create,
                                                this->child_sa->get_mark(this->child_sa, TRUE).value,
                                                this->child_sa->get_mark(this->child_sa, FALSE).value);
+       this->child_create->use_if_ids(this->child_create,
+                                               this->child_sa->get_if_id(this->child_sa, TRUE),
+                                               this->child_sa->get_if_id(this->child_sa, FALSE));
 
        if (this->child_create->task.build(&this->child_create->task,
                                                                           message) != NEED_MORE)
@@ -266,6 +269,9 @@ METHOD(task_t, build_r, status_t,
        this->child_create->use_marks(this->child_create,
                                                this->child_sa->get_mark(this->child_sa, TRUE).value,
                                                this->child_sa->get_mark(this->child_sa, FALSE).value);
+       this->child_create->use_if_ids(this->child_create,
+                                               this->child_sa->get_if_id(this->child_sa, TRUE),
+                                               this->child_sa->get_if_id(this->child_sa, FALSE));
        config = this->child_sa->get_config(this->child_sa);
        this->child_create->set_config(this->child_create, config->get_ref(config));
        this->child_create->task.build(&this->child_create->task, message);