Use the IKEv1 specific delete in IKEv1 SAs
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#include <sa/tasks/quick_mode.h>
|
||||
#include <sa/tasks/ike_natd_v1.h>
|
||||
#include <sa/tasks/ike_vendor_v1.h>
|
||||
#include <sa/tasks/isakmp_delete.h>
|
||||
#include <processing/jobs/retransmit_job.h>
|
||||
#include <processing/jobs/delete_ike_sa_job.h>
|
||||
#include <processing/jobs/send_dpd_job.h>
|
||||
@@ -1373,14 +1374,21 @@ METHOD(ike_sa_t, destroy_child_sa, status_t,
|
||||
METHOD(ike_sa_t, delete_, status_t,
|
||||
private_ike_sa_t *this)
|
||||
{
|
||||
ike_delete_t *ike_delete;
|
||||
task_t *task;
|
||||
|
||||
switch (this->state)
|
||||
{
|
||||
case IKE_ESTABLISHED:
|
||||
case IKE_REKEYING:
|
||||
ike_delete = ike_delete_create(&this->public, TRUE);
|
||||
this->task_manager->queue_task(this->task_manager, &ike_delete->task);
|
||||
if (this->version == IKEV1)
|
||||
{
|
||||
task = (task_t*)isakmp_delete_create(&this->public, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
task = (task_t*)ike_delete_create(&this->public, TRUE);
|
||||
}
|
||||
this->task_manager->queue_task(this->task_manager, task);
|
||||
return this->task_manager->initiate(this->task_manager);
|
||||
case IKE_CREATED:
|
||||
DBG1(DBG_IKE, "deleting unestablished IKE_SA");
|
||||
|
||||
@@ -334,7 +334,7 @@ METHOD(task_manager_t, initiate, status_t,
|
||||
exchange = INFORMATIONAL_V1;
|
||||
new_mid = TRUE;
|
||||
}
|
||||
if (activate_task(this, TASK_IKE_DELETE))
|
||||
if (activate_task(this, TASK_ISAKMP_DELETE))
|
||||
{
|
||||
exchange = INFORMATIONAL_V1;
|
||||
new_mid = TRUE;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "informational.h"
|
||||
|
||||
#include <daemon.h>
|
||||
#include <sa/tasks/ike_delete.h>
|
||||
#include <sa/tasks/isakmp_delete.h>
|
||||
#include <sa/tasks/child_delete.h>
|
||||
#include <encoding/payloads/delete_payload.h>
|
||||
|
||||
@@ -99,8 +99,8 @@ METHOD(task_t, process_r, status_t,
|
||||
delete = (delete_payload_t*)payload;
|
||||
if (delete->get_protocol_id(delete) == PROTO_IKE)
|
||||
{
|
||||
this->del = (task_t*)ike_delete_create(this->ike_sa,
|
||||
FALSE);
|
||||
this->del = (task_t*)isakmp_delete_create(this->ike_sa,
|
||||
FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user