Destroy IKE_SA after reauthentication initiatend and lifetime limit reached
authorMartin Willi <martin@revosec.ch>
Wed, 4 Jan 2012 16:50:19 +0000 (17:50 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 20 Mar 2012 16:31:33 +0000 (17:31 +0100)
src/libcharon/sa/ike_sa.c

index d659a3c..1992a60 100644 (file)
@@ -1296,8 +1296,13 @@ METHOD(ike_sa_t, delete_, status_t,
 {
        switch (this->state)
        {
-               case IKE_ESTABLISHED:
                case IKE_REKEYING:
+                       if (this->version == IKEV1)
+                       {       /* SA has been reauthenticated, delete */
+                               break;
+                       }
+                       /* FALL */
+               case IKE_ESTABLISHED:
                        this->task_manager->queue_ike_delete(this->task_manager);
                        return this->task_manager->initiate(this->task_manager);
                case IKE_CREATED: