Defer CHILD_SA rekeying if allocating an SPI fails
[strongswan.git] / src / libcharon / sa / ikev2 / task_manager_v2.c
index a53c06b..5298abf 100644 (file)
@@ -475,6 +475,7 @@ METHOD(task_manager_t, initiate, status_t,
                                break;
                        case FAILED:
                        default:
+                               this->initiating.type = EXCHANGE_TYPE_UNDEFINED;
                                if (this->ike_sa->get_state(this->ike_sa) != IKE_CONNECTING)
                                {
                                        charon->bus->ike_updown(charon->bus, this->ike_sa, FALSE);