ikev2: Ignore COOKIE notifies we already received

This could be due to a delayed response to an IKE_SA_INIT retransmit.

Fixes #2837.
This commit is contained in:
Tobias Brunner 2018-11-28 15:52:27 +01:00
parent eed20c21d3
commit 01f462f0d3

View File

@ -890,6 +890,20 @@ METHOD(task_t, pre_process_i, status_t,
switch (type)
{
case COOKIE:
{
chunk_t cookie;
cookie = notify->get_notification_data(notify);
if (chunk_equals(cookie, this->cookie))
{
DBG1(DBG_IKE, "ignore response with duplicate COOKIE "
"notify");
enumerator->destroy(enumerator);
return FAILED;
}
break;
}
case REDIRECT:
{
identification_t *gateway;