diff options
author | Tobias Brunner <tobias@strongswan.org> | 2016-10-04 15:15:36 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-02-08 15:03:26 +0100 |
commit | c3d98d298ec2238a8a76694587fa1f36b5a1e14c (patch) | |
tree | ac2028a2a609ab73b5de9b2e1f1c362623455b6f /src/libcharon/sa/ikev2/task_manager_v2.c | |
parent | fb57904cbffefcfdacedac59676115062d77c37a (diff) | |
download | strongswan-c3d98d298ec2238a8a76694587fa1f36b5a1e14c.tar.bz2 strongswan-c3d98d298ec2238a8a76694587fa1f36b5a1e14c.tar.xz |
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.
Diffstat (limited to 'src/libcharon/sa/ikev2/task_manager_v2.c')
-rw-r--r-- | src/libcharon/sa/ikev2/task_manager_v2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcharon/sa/ikev2/task_manager_v2.c b/src/libcharon/sa/ikev2/task_manager_v2.c index debfe23fa..778349c08 100644 --- a/src/libcharon/sa/ikev2/task_manager_v2.c +++ b/src/libcharon/sa/ikev2/task_manager_v2.c @@ -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); |