Added a TODO for creating IKE_SAs with unsupported protocol version
authorMartin Willi <martin@revosec.ch>
Mon, 19 Dec 2011 14:50:31 +0000 (15:50 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:31:28 +0000 (17:31 +0100)
src/libcharon/sa/ike_sa.c

index 1e24225..000c3e5 100644 (file)
@@ -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;
 }