Fix init message arrival check.

This commit is contained in:
Tobias Brunner
2012-03-20 17:30:41 +01:00
parent 354ac9579f
commit 3238faf8e6
-7
View File
@@ -1030,8 +1030,6 @@ METHOD(ike_sa_manager_t, checkout_by_message, ike_sa_t*,
} }
if (ike_sa == NULL) if (ike_sa == NULL)
{
if (is_init)
{ {
/* no IKE_SA found, create a new one */ /* no IKE_SA found, create a new one */
id->set_responder_spi(id, get_spi(this)); id->set_responder_spi(id, get_spi(this));
@@ -1055,11 +1053,6 @@ METHOD(ike_sa_manager_t, checkout_by_message, ike_sa_t*,
chunk_free(&hash); chunk_free(&hash);
DBG1(DBG_MGR, "ignoring message, no such IKE_SA"); DBG1(DBG_MGR, "ignoring message, no such IKE_SA");
} }
}
else
{
chunk_free(&hash);
}
id->destroy(id); id->destroy(id);
charon->bus->set_sa(charon->bus, ike_sa); charon->bus->set_sa(charon->bus, ike_sa);
return ike_sa; return ike_sa;