added close_action as a seperate config option to dpd_action

This commit is contained in:
Martin Willi
2008-04-14 08:17:18 +00:00
parent cadb5d16e5
commit 348af092ac
7 changed files with 72 additions and 32 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ static status_t destroy_and_reestablish(private_child_delete_t *this)
this->ike_sa->destroy_child_sa(this->ike_sa, protocol, spi);
if (!this->initiator)
{ /* enforce child_cfg policy if deleted passively */
switch (child_cfg->get_action(child_cfg))
switch (child_cfg->get_close_action(child_cfg))
{
case ACTION_RESTART:
child_cfg->get_ref(child_cfg);
+5 -6
View File
@@ -82,19 +82,18 @@ static status_t process_r(private_ike_delete_t *this, message_t *message)
* come so far without being correct */
switch (this->ike_sa->get_state(this->ike_sa))
{
case IKE_DELETING:
this->simultaneous = TRUE;
break;
case IKE_ESTABLISHED:
DBG1(DBG_IKE, "deleting IKE_SA on request");
this->ike_sa->set_state(this->ike_sa, IKE_DELETING);
this->ike_sa->reestablish(this->ike_sa);
break;
case IKE_REKEYING:
break;
case IKE_DELETING:
this->simultaneous = TRUE;
/* FALL */
default:
this->ike_sa->set_state(this->ike_sa, IKE_DELETING);
break;
}
this->ike_sa->set_state(this->ike_sa, IKE_DELETING);
return NEED_MORE;
}