]> git.ipfire.org Git - thirdparty/strongswan.git/blobdiff - src/libcharon/sa/trap_manager.c
child-sa: Pass default interface ID inherited from IKE_SA
[thirdparty/strongswan.git] / src / libcharon / sa / trap_manager.c
index 7acbb28c218ffa7e29e6b9faf00fca84fdbe4ce4..2bc531b387dd2a0d4a6d91dd5422f33627ee27a7 100644 (file)
@@ -293,7 +293,14 @@ METHOD(trap_manager_t, install, bool,
        this->lock->unlock(this->lock);
 
        /* create and route CHILD_SA */
-       child_sa = child_sa_create(me, other, child, 0, FALSE, 0, 0, 0, 0);
+       child_sa_create_t child_data = {
+               /* TODO: no reason to allocate unique interface IDs, there is currently
+                * no event to use them upon trap installation and we'd also have to
+                * pass them in a later initiate() call */
+               .if_id_in_def = peer->get_if_id(peer, TRUE),
+               .if_id_out_def = peer->get_if_id(peer, FALSE),
+       };
+       child_sa = child_sa_create(me, other, child, &child_data);
 
        list = linked_list_create_with_items(me, NULL);
        my_ts = child->get_traffic_selectors(child, TRUE, NULL, list, FALSE);