Removed IKEv1 specific code from ike_delete task
authorMartin Willi <martin@revosec.ch>
Wed, 14 Dec 2011 14:28:43 +0000 (15:28 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:31:22 +0000 (17:31 +0100)
src/libcharon/sa/tasks/ike_delete.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 56d4231..29ac872
@@ -56,7 +56,6 @@ METHOD(task_t, build_i, status_t,
        private_ike_delete_t *this, message_t *message)
 {
        delete_payload_t *delete_payload;
-       ike_sa_id_t *id;
 
        DBG0(DBG_IKE, "deleting IKE_SA %s[%d] between %H[%Y]...%H[%Y]",
                 this->ike_sa->get_name(this->ike_sa),
@@ -66,17 +65,7 @@ METHOD(task_t, build_i, status_t,
                 this->ike_sa->get_other_host(this->ike_sa),
                 this->ike_sa->get_other_id(this->ike_sa));
 
-       if (this->ike_sa->get_version(this->ike_sa) == IKEV1)
-       {
-               delete_payload = delete_payload_create(DELETE_V1, PROTO_IKE);
-               id = this->ike_sa->get_id(this->ike_sa);
-               delete_payload->set_ike_spi(delete_payload, id->get_initiator_spi(id),
-                                                                       id->get_responder_spi(id));
-       }
-       else
-       {
-               delete_payload = delete_payload_create(DELETE, PROTO_IKE);
-       }
+       delete_payload = delete_payload_create(DELETE, PROTO_IKE);
        message->add_payload(message, (payload_t*)delete_payload);
 
        if (this->ike_sa->get_state(this->ike_sa) == IKE_REKEYING)
@@ -125,15 +114,7 @@ METHOD(task_t, process_r, status_t,
                case IKE_ESTABLISHED:
                        this->ike_sa->set_state(this->ike_sa, IKE_DELETING);
                        this->ike_sa->reestablish(this->ike_sa);
-                       if (this->ike_sa->get_version(this->ike_sa) == IKEV2)
-                       {
-                               return NEED_MORE;
-                       }
-                       else
-                       {
-                               /* Dont send message to other side */
-                               return DESTROY_ME;
-                       }
+                       return NEED_MORE;
                case IKE_REKEYING:
                        this->rekeyed = TRUE;
                        break;