ike: Fix half-open count for initiating SAs when initially checked in
authorTobias Brunner <tobias@strongswan.org>
Mon, 24 Aug 2015 10:27:34 +0000 (12:27 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 27 Aug 2015 09:21:01 +0000 (11:21 +0200)
src/libcharon/sa/ike_sa_manager.c

index 9f4496a..37d6987 100644 (file)
@@ -1608,6 +1608,12 @@ METHOD(ike_sa_manager_t, checkin, void,
                entry = entry_create();
                entry->ike_sa_id = ike_sa_id->clone(ike_sa_id);
                entry->ike_sa = ike_sa;
+               if (ike_sa->get_state(ike_sa) == IKE_CONNECTING)
+               {
+                       entry->half_open = TRUE;
+                       entry->other = other->clone(other);
+                       put_half_open(this, entry);
+               }
                segment = put_entry(this, entry);
        }