From 438a8d785f299f04ad67b8c0b1ce9f6ad03990b6 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 19 Dec 2011 15:50:31 +0100 Subject: [PATCH] Added a TODO for creating IKE_SAs with unsupported protocol version --- src/libcharon/sa/ike_sa.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libcharon/sa/ike_sa.c b/src/libcharon/sa/ike_sa.c index 1e24225b2..000c3e539 100644 --- a/src/libcharon/sa/ike_sa.c +++ b/src/libcharon/sa/ike_sa.c @@ -1871,11 +1871,6 @@ ike_sa_t * ike_sa_create(ike_sa_id_t *ike_sa_id, bool initiator, private_ike_sa_t *this; static u_int32_t unique_id = 0; - if (version != IKEV1) - { - version = IKEV2; - } - INIT(this, .public = { .get_version = _get_version, @@ -1986,5 +1981,8 @@ ike_sa_t * ike_sa_create(ike_sa_id_t *ike_sa_id, bool initiator, this->task_manager = task_manager_create(&this->public); this->my_host->set_port(this->my_host, IKEV2_UDP_PORT); + /* TODO-IKEv1: check if keymat and task manager created successfully. + * Return NULL otherwise? */ + return &this->public; }