ikev2: Don't increase expected MID after handling MID sync message
authorTobias Brunner <tobias@strongswan.org>
Tue, 4 Oct 2016 13:15:36 +0000 (15:15 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 8 Feb 2017 14:03:26 +0000 (15:03 +0100)
commitc3d98d298ec2238a8a76694587fa1f36b5a1e14c
treeac2028a2a609ab73b5de9b2e1f1c362623455b6f
parentfb57904cbffefcfdacedac59676115062d77c37a
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.
src/libcharon/sa/ikev2/task_manager_v2.c
src/libcharon/sa/ikev2/tasks/ike_mid_sync.c