ikev2: Don't increase expected MID after handling MID sync message

If the responder never sent a message the expected MID is 0.  While
the sent MID (M1) SHOULD be increased beyond the known value, it's
not necessarily the case.
Since M2 - 1 would then equal UINT_MAX setting that MID would get ignored
and while we'd return 0 in the notify we'd actually expect 1 afterwards.
This commit is contained in:
Tobias Brunner
2017-02-08 15:03:26 +01:00
parent fb57904cbf
commit c3d98d298e
2 changed files with 4 additions and 3 deletions
+3
View File
@@ -918,6 +918,9 @@ static status_t build_response(private_task_manager_t *this, message_t *request)
/* we don't want to resend messages to sync MIDs if requests with the
* previous MID arrive */
clear_packets(this->responding.packets);
/* avoid increasing the expected message ID after handling a message
* to sync MIDs with MID 0 */
return NEED_MORE;
}
array_compress(this->passive_tasks);