aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorJan Hutter <jhutter@hsr.ch>2005-11-17 14:26:42 +0000
committerJan Hutter <jhutter@hsr.ch>2005-11-17 14:26:42 +0000
commitc5841ec587bb3636cc8323e25a645258bf6c4873 (patch)
tree57ef94d86069655fe08758f325a27d832b064145 /Source
parentf1c55803dd0c195cc42d886417667d2c445ed037 (diff)
downloadstrongswan-c5841ec587bb3636cc8323e25a645258bf6c4873.tar.bz2
strongswan-c5841ec587bb3636cc8323e25a645258bf6c4873.tar.xz
-added processing of DELETE_IKE_SA job
Diffstat (limited to 'Source')
-rw-r--r--Source/charon/thread_pool.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/charon/thread_pool.c b/Source/charon/thread_pool.c
index 3baa241e2..9d48ae4ed 100644
--- a/Source/charon/thread_pool.c
+++ b/Source/charon/thread_pool.c
@@ -219,6 +219,30 @@ static void job_processing(private_thread_pool_t *this)
this->logger->log(this->logger, CONTROL_MORE, "thread %u: Job of type %s not supported!", pthread_self(),mapping_find(job_type_m,job_type));
break;
}
+
+ case DELETE_IKE_SA:
+ {
+ delete_ike_sa_job_t *delete_ike_sa_job = (delete_ike_sa_job_t*) job;
+ ike_sa_id_t *ike_sa_id = delete_ike_sa_job->get_ike_sa_id(delete_ike_sa_job);
+ status_t status;
+
+ {
+ /* only for logging */
+ u_int64_t initiator;
+ u_int64_t responder;
+ bool is_initiator;
+ ike_sa_id->get_values(ike_sa_id,&initiator,&responder,&is_initiator);
+ this->logger->log(this->logger, CONTROL_MORE, "thread %u: Going to delete IKE SA with SPI's I:%d, R:%d", pthread_self(),initiator,responder);
+ }
+ status = global_ike_sa_manager->delete(global_ike_sa_manager, ike_sa_id);
+ if (status != SUCCESS)
+ {
+ this->logger->log(this->logger, ERROR, "thread %u: %s could not delete IKE_SA.",
+ pthread_self(), mapping_find(status_m, status));
+ }
+ break;
+
+ }
}
job->destroy(job);
}