Setting message ID on task manager sets DPD sequence numbers in IKEv1

This commit is contained in:
Martin Willi
2012-03-20 17:31:38 +01:00
parent 783c496966
commit fd6fbf1764
2 changed files with 12 additions and 2 deletions
+8
View File
@@ -1393,6 +1393,14 @@ METHOD(task_manager_t, reset, void,
this->initiating.seqnr = 0;
this->initiating.retransmitted = 0;
this->initiating.type = EXCHANGE_TYPE_UNDEFINED;
if (initiate != UINT_MAX)
{
this->dpd_send = initiate;
}
if (respond != UINT_MAX)
{
this->dpd_recv = respond;
}
/* reset queued tasks */
enumerator = this->queued_tasks->create_enumerator(this->queued_tasks);
+4 -2
View File
@@ -229,9 +229,11 @@ struct task_manager_t {
* resets the message IDs and resets all active tasks using the migrate()
* method.
* Use a value of UINT_MAX to keep the current message ID.
* For IKEv1, the arguments do not set the message ID, but the DPD sequence
* number counters.
*
* @param initiate message ID to initiate exchanges (send)
* @param respond message ID to respond to exchanges (expect)
* @param initiate message ID / DPD seq to initiate exchanges (send)
* @param respond message ID / DPD seq to respond to exchanges (expect)
*/
void (*reset) (task_manager_t *this, u_int32_t initiate, u_int32_t respond);