Move initial message dropping to task manager

When the last request message of the initial tunnel setup is retransmitted,
we must retransmit the response instead of ignoring the request.

Fixes #295.
This commit is contained in:
Martin Willi
2013-02-25 12:12:19 +01:00
parent 9eaed7a5bb
commit cdf75a39e3
3 changed files with 27 additions and 19 deletions
-18
View File
@@ -1250,24 +1250,6 @@ METHOD(ike_sa_t, process_message, status_t,
{ /* do not handle messages in passive state */
return FAILED;
}
switch (message->get_exchange_type(message))
{
case ID_PROT:
case AGGRESSIVE:
case IKE_SA_INIT:
case IKE_AUTH:
if (this->state != IKE_CREATED &&
this->state != IKE_CONNECTING &&
message->get_first_payload_type(message) != FRAGMENT_V1)
{
DBG1(DBG_IKE, "ignoring %N in established IKE_SA state",
exchange_type_names, message->get_exchange_type(message));
return FAILED;
}
break;
default:
break;
}
if (message->get_major_version(message) != this->version)
{
DBG1(DBG_IKE, "ignoring %N IKEv%u exchange on %N SA",