vici: With start_action=start, terminate IKE_SA without children on unload

This includes IKE_SAs in CONNECTING state, which not yet have any
CHILD_SAs.

Closes strongswan/strongswan#175.
This commit is contained in:
Tobias Brunner 2020-07-01 13:49:58 +02:00
parent 6870a9b590
commit feda4a3d37
1 changed files with 2 additions and 2 deletions

View File

@ -2202,9 +2202,9 @@ static void clear_start_action(private_vici_config_t *this, char *peer_name,
}
children->destroy(children);
if (id && !others)
if (!ike_sa->get_child_count(ike_sa) || (id && !others))
{
/* found matching children only, delete full IKE_SA */
/* found no children or only matching, delete IKE_SA */
id = ike_sa->get_unique_id(ike_sa);
array_insert_create_value(&ikeids, sizeof(id),
ARRAY_TAIL, &id);