aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/sa/task_manager_v1.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2011-12-15 17:28:58 +0100
committerMartin Willi <martin@revosec.ch>2012-03-20 17:31:24 +0100
commit429d95fef265e1c24da09d4559d7858a9d03467f (patch)
treec01c047015ffa8ee1dbb4adb63d9d9f04e82a25c /src/libcharon/sa/task_manager_v1.c
parent5762c0efebc31b88ae2e50a3fc7def71be7b3363 (diff)
downloadstrongswan-429d95fef265e1c24da09d4559d7858a9d03467f.tar.bz2
strongswan-429d95fef265e1c24da09d4559d7858a9d03467f.tar.xz
Send delete if Main Mode authentication fails as initiator
Diffstat (limited to 'src/libcharon/sa/task_manager_v1.c')
-rw-r--r--src/libcharon/sa/task_manager_v1.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libcharon/sa/task_manager_v1.c b/src/libcharon/sa/task_manager_v1.c
index 2f905516d..c10f63d0f 100644
--- a/src/libcharon/sa/task_manager_v1.c
+++ b/src/libcharon/sa/task_manager_v1.c
@@ -180,6 +180,11 @@ static void flush_queue(private_task_manager_t *this, linked_list_t *list)
{
task_t *task;
+ if (this->queued)
+ {
+ this->queued->destroy(this->queued);
+ this->queued = NULL;
+ }
while (list->remove_last(list, (void**)&task) == SUCCESS)
{
task->destroy(task);
@@ -305,15 +310,23 @@ METHOD(task_manager_t, initiate, status_t,
}
break;
case IKE_CONNECTING:
+ if (activate_task(this, TASK_ISAKMP_DELETE))
+ {
+ exchange = INFORMATIONAL_V1;
+ new_mid = TRUE;
+ break;
+ }
if (activate_task(this, TASK_XAUTH))
{
exchange = TRANSACTION;
new_mid = TRUE;
+ break;
}
if (activate_task(this, TASK_INFORMATIONAL))
{
exchange = INFORMATIONAL_V1;
new_mid = TRUE;
+ break;
}
break;
case IKE_ESTABLISHED:
@@ -333,16 +346,19 @@ METHOD(task_manager_t, initiate, status_t,
{
exchange = INFORMATIONAL_V1;
new_mid = TRUE;
+ break;
}
if (activate_task(this, TASK_ISAKMP_DELETE))
{
exchange = INFORMATIONAL_V1;
new_mid = TRUE;
+ break;
}
if (activate_task(this, TASK_QUICK_DELETE))
{
exchange = INFORMATIONAL_V1;
new_mid = TRUE;
+ break;
}
break;
default: