Use IKEv1 specific tasks to close Quick Mode SAs
This commit is contained in:
@@ -48,6 +48,7 @@
|
|||||||
#include <sa/tasks/child_rekey.h>
|
#include <sa/tasks/child_rekey.h>
|
||||||
#include <sa/tasks/main_mode.h>
|
#include <sa/tasks/main_mode.h>
|
||||||
#include <sa/tasks/quick_mode.h>
|
#include <sa/tasks/quick_mode.h>
|
||||||
|
#include <sa/tasks/quick_delete.h>
|
||||||
#include <sa/tasks/ike_natd_v1.h>
|
#include <sa/tasks/ike_natd_v1.h>
|
||||||
#include <sa/tasks/ike_vendor_v1.h>
|
#include <sa/tasks/ike_vendor_v1.h>
|
||||||
#include <sa/tasks/isakmp_delete.h>
|
#include <sa/tasks/isakmp_delete.h>
|
||||||
@@ -1341,10 +1342,17 @@ METHOD(ike_sa_t, rekey_child_sa, status_t,
|
|||||||
METHOD(ike_sa_t, delete_child_sa, status_t,
|
METHOD(ike_sa_t, delete_child_sa, status_t,
|
||||||
private_ike_sa_t *this, protocol_id_t protocol, u_int32_t spi)
|
private_ike_sa_t *this, protocol_id_t protocol, u_int32_t spi)
|
||||||
{
|
{
|
||||||
child_delete_t *child_delete;
|
task_t *task;
|
||||||
|
|
||||||
child_delete = child_delete_create(&this->public, protocol, spi);
|
if (this->version == IKEV1)
|
||||||
this->task_manager->queue_task(this->task_manager, &child_delete->task);
|
{
|
||||||
|
task = (task_t*)quick_delete_create(&this->public, protocol, spi);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
task = (task_t*)child_delete_create(&this->public, protocol, spi);
|
||||||
|
}
|
||||||
|
this->task_manager->queue_task(this->task_manager, task);
|
||||||
return this->task_manager->initiate(this->task_manager);
|
return this->task_manager->initiate(this->task_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ METHOD(task_manager_t, initiate, status_t,
|
|||||||
exchange = INFORMATIONAL_V1;
|
exchange = INFORMATIONAL_V1;
|
||||||
new_mid = TRUE;
|
new_mid = TRUE;
|
||||||
}
|
}
|
||||||
if (activate_task(this, TASK_CHILD_DELETE))
|
if (activate_task(this, TASK_QUICK_DELETE))
|
||||||
{
|
{
|
||||||
exchange = INFORMATIONAL_V1;
|
exchange = INFORMATIONAL_V1;
|
||||||
new_mid = TRUE;
|
new_mid = TRUE;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include <daemon.h>
|
#include <daemon.h>
|
||||||
#include <sa/tasks/isakmp_delete.h>
|
#include <sa/tasks/isakmp_delete.h>
|
||||||
#include <sa/tasks/child_delete.h>
|
#include <sa/tasks/quick_delete.h>
|
||||||
#include <encoding/payloads/delete_payload.h>
|
#include <encoding/payloads/delete_payload.h>
|
||||||
|
|
||||||
typedef struct private_informational_t private_informational_t;
|
typedef struct private_informational_t private_informational_t;
|
||||||
@@ -104,7 +104,7 @@ METHOD(task_t, process_r, status_t,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->del = (task_t*)child_delete_create(this->ike_sa,
|
this->del = (task_t*)quick_delete_create(this->ike_sa,
|
||||||
PROTO_NONE, 0);
|
PROTO_NONE, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user