]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
ha: Register new IKE_SAs before calling inherit_post()
authorTobias Brunner <tobias@strongswan.org>
Fri, 15 Jan 2021 15:28:24 +0000 (16:28 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 12 Feb 2021 14:49:08 +0000 (15:49 +0100)
src/libcharon/plugins/ha/ha_dispatcher.c

index ff75cb5c1acd27e83752a2943786a248f8f4bbaa..3c608e614cfaa30d306149e605932cf8787a4592 100644 (file)
@@ -259,7 +259,10 @@ static void process_ike_add(private_ha_dispatcher_t *this, ha_message_t *message
                if (ok)
                {
                        if (old_sa)
-                       {
+                       {       /* register IKE_SA before calling inherit_post() so no scheduled
+                                * jobs are lost */
+                               charon->ike_sa_manager->checkout_new(charon->ike_sa_manager,
+                                                                                                        old_sa);
                                ike_sa->inherit_pre(ike_sa, old_sa);
                                ike_sa->inherit_post(ike_sa, old_sa);
                                charon->ike_sa_manager->checkin_and_destroy(