During reauthentication reestablish IKE_SA even if deleting the old one fails.
authorTobias Brunner <tobias@strongswan.org>
Wed, 9 May 2012 13:15:43 +0000 (15:15 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 25 May 2012 15:05:53 +0000 (17:05 +0200)
src/libcharon/sa/ike_sa.c

index 71a0729..fc69ecb 100644 (file)
@@ -1627,6 +1627,12 @@ METHOD(ike_sa_t, retransmit, status_t,
                        }
                        case IKE_DELETING:
                                DBG1(DBG_IKE, "proper IKE_SA delete failed, peer not responding");
                        }
                        case IKE_DELETING:
                                DBG1(DBG_IKE, "proper IKE_SA delete failed, peer not responding");
+                               if (this->is_reauthenticating)
+                               {
+                                       DBG1(DBG_IKE, "delete during reauthentication failed, "
+                                                "trying to reestablish IKE_SA anyway");
+                                       reestablish(this);
+                               }
                                break;
                        case IKE_REKEYING:
                                DBG1(DBG_IKE, "rekeying IKE_SA failed, peer not responding");
                                break;
                        case IKE_REKEYING:
                                DBG1(DBG_IKE, "rekeying IKE_SA failed, peer not responding");