ikev1: Reestablish IKE_SA/CHILD_SAs if it gets deleted by the peer

We call ike_sa_t.reestablish() so the IKE_SA is only recreated if any
CHILD_SA requires it.
This commit is contained in:
Tobias Brunner
2013-07-17 18:16:59 +02:00
parent 68db844f99
commit a9ffb48f21
@@ -85,6 +85,11 @@ METHOD(task_t, process_r, status_t,
this->ike_sa->get_other_host(this->ike_sa),
this->ike_sa->get_other_id(this->ike_sa));
if (this->ike_sa->get_state(this->ike_sa) == IKE_ESTABLISHED)
{
this->ike_sa->set_state(this->ike_sa, IKE_DELETING);
this->ike_sa->reestablish(this->ike_sa);
}
this->ike_sa->set_state(this->ike_sa, IKE_DELETING);
charon->bus->ike_updown(charon->bus, this->ike_sa, FALSE);
return DESTROY_ME;