diff options
author | Martin Willi <martin@strongswan.org> | 2006-03-14 13:22:48 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-03-14 13:22:48 +0000 |
commit | b1953ccd05b5e6cf5a87c557208d5f8a1fcad231 (patch) | |
tree | 18f93845a0a64dfd59ef89bb9df7ecd1eaecf979 /Source/charon/threads/thread_pool.c | |
parent | 8a4911290753eb3b4d3070ed9097d7cbcd2fd349 (diff) | |
download | strongswan-b1953ccd05b5e6cf5a87c557208d5f8a1fcad231.tar.bz2 strongswan-b1953ccd05b5e6cf5a87c557208d5f8a1fcad231.tar.xz |
- first attempt for connection loading and starting via "stroke"
- some improvements here and there
Diffstat (limited to 'Source/charon/threads/thread_pool.c')
-rw-r--r-- | Source/charon/threads/thread_pool.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/Source/charon/threads/thread_pool.c b/Source/charon/threads/thread_pool.c index e4c94d9ad..8e14fc37e 100644 --- a/Source/charon/threads/thread_pool.c +++ b/Source/charon/threads/thread_pool.c @@ -233,26 +233,22 @@ static void process_incoming_packet_job(private_thread_pool_t *this, incoming_pa if ((message->get_major_version(message) != IKE_MAJOR_VERSION) || (message->get_minor_version(message) != IKE_MINOR_VERSION)) - { this->worker_logger->log(this->worker_logger, ERROR | LEVEL2, "IKE version %d.%d not supported", - message->get_major_version(message), - message->get_minor_version(message)); + message->get_major_version(message), + message->get_minor_version(message)); /* - * TODO send notify reply of type INVALID_MAJOR_VERSION for requests of type IKE_SA_INIT. - * * This check is not handled in state_t object of IKE_SA to increase speed. */ - if ((message->get_exchange_type(message) == IKE_SA_INIT) && (message->get_request(message))) - { - message_t *response; - message->get_ike_sa_id(message, &ike_sa_id); - ike_sa_id->switch_initiator(ike_sa_id); - response = message_create_notify_reply(message->get_destination(message), - message->get_source(message), - IKE_SA_INIT, - FALSE,ike_sa_id,INVALID_MAJOR_VERSION); - + if ((message->get_exchange_type(message) == IKE_SA_INIT) && (message->get_request(message))) + { + message_t *response; + message->get_ike_sa_id(message, &ike_sa_id); + ike_sa_id->switch_initiator(ike_sa_id); + response = message_create_notify_reply(message->get_destination(message), + message->get_source(message), + IKE_SA_INIT, + FALSE,ike_sa_id,INVALID_MAJOR_VERSION); message->destroy(message); ike_sa_id->destroy(ike_sa_id); status = response->generate(response, NULL, NULL, &packet); @@ -266,10 +262,9 @@ static void process_incoming_packet_job(private_thread_pool_t *this, incoming_pa charon->send_queue->add(charon->send_queue, packet); response->destroy(response); return; - } - message->destroy(message); - - return; + } + message->destroy(message); + return; } message->get_ike_sa_id(message, &ike_sa_id); |