From: Tobias Brunner Date: Mon, 9 May 2022 11:33:49 +0000 (+0200) Subject: adopt-children-job: Avoid reordering CHILD_SAs X-Git-Tag: 5.9.7dr1~4 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=64d73235c4e4476698f87cebe1092970b1440051;p=thirdparty%2Fstrongswan.git adopt-children-job: Avoid reordering CHILD_SAs References strongswan/strongswan#1041 --- diff --git a/src/libcharon/processing/jobs/adopt_children_job.c b/src/libcharon/processing/jobs/adopt_children_job.c index f969419fd2..b909984736 100644 --- a/src/libcharon/processing/jobs/adopt_children_job.c +++ b/src/libcharon/processing/jobs/adopt_children_job.c @@ -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); }