]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
adopt-children-job: Avoid reordering CHILD_SAs
authorTobias Brunner <tobias@strongswan.org>
Mon, 9 May 2022 11:33:49 +0000 (13:33 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 10 May 2022 07:08:17 +0000 (09:08 +0200)
References strongswan/strongswan#1041

src/libcharon/processing/jobs/adopt_children_job.c

index f969419fd20827d6db2c5eae769a17f7f42272b5..b909984736ae44f21ff0d26253a8f7d39227a4ed 100644 (file)
@@ -212,8 +212,8 @@ METHOD(job_t, execute, job_requeue_t,
                                                                                                          this->id);
                        if (ike_sa)
                        {
-                               while (children->remove_last(children,
-                                                                                        (void**)&child_sa) == SUCCESS)
+                               while (children->remove_first(children,
+                                                                                         (void**)&child_sa) == SUCCESS)
                                {
                                        ike_sa->add_child_sa(ike_sa, child_sa);
                                }