ha: Register new IKE_SAs before calling inherit_post()

This commit is contained in:
Tobias Brunner 2021-01-15 16:28:24 +01:00
parent 1c5cef1b89
commit 20dfbcad08
1 changed files with 4 additions and 1 deletions

View 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(