private_ike_sa_t *this)
{
attribute_entry_t entry;
+ child_sa_t *child_sa;
host_t *vip;
charon->bus->set_sa(charon->bus, &this->public);
this->other_id, entry.type, entry.data);
free(entry.data.ptr);
}
+ /* uninstall CHILD_SAs before virtual IPs, otherwise we might kill
+ * routes that the CHILD_SA tries to uninstall. */
+ while (array_remove(this->child_sas, ARRAY_TAIL, &child_sa))
+ {
+ child_sa->destroy(child_sa);
+ }
while (array_remove(this->my_vips, ARRAY_TAIL, &vip))
{
hydra->kernel_interface->del_ip(hydra->kernel_interface, vip, -1, TRUE);
/* unset SA after here to avoid usage by the listeners */
charon->bus->set_sa(charon->bus, NULL);
- array_destroy_offset(this->child_sas, offsetof(child_sa_t, destroy));
+ array_destroy(this->child_sas);
DESTROY_IF(this->keymat);
array_destroy(this->attributes);
array_destroy(this->my_vips);