]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
quick-delete: Correctly maintain allocated reqid when recreating CHILD_SA
authorTobias Brunner <tobias@strongswan.org>
Mon, 2 Oct 2023 14:10:40 +0000 (16:10 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 13 Nov 2023 11:02:11 +0000 (12:02 +0100)
src/libcharon/sa/ikev1/tasks/quick_delete.c

index bff7a1d7ce1671f9a3ac26adb7c055b1436e1c5b..0da50ed405f1df405db7ccd713e2bacd3cb4b44e 100644 (file)
@@ -151,7 +151,7 @@ static status_t delete_child(private_quick_delete_t *this,
                if (remote_close)
                {
                        child_init_args_t args = {
-                               .reqid = child_sa->get_reqid(child_sa),
+                               .reqid = child_sa->get_reqid_ref(child_sa),
                        };
                        action_t action;
 
@@ -169,6 +169,10 @@ static status_t delete_child(private_quick_delete_t *this,
                                child_cfg->get_ref(child_cfg);
                                status = this->ike_sa->initiate(this->ike_sa, child_cfg, &args);
                        }
+                       if (args.reqid)
+                       {
+                               charon->kernel->release_reqid(charon->kernel, args.reqid);
+                       }
                        child_cfg->destroy(child_cfg);
                }
        }