Send unanswered follow up R_U_THERE messages with the same DPD seq
authorMartin Willi <martin@revosec.ch>
Tue, 15 May 2012 12:27:16 +0000 (14:27 +0200)
committerMartin Willi <martin@revosec.ch>
Tue, 15 May 2012 12:46:02 +0000 (14:46 +0200)
src/libcharon/sa/ikev1/task_manager_v1.c

index 1dc9bf5..891f3d6 100755 (executable)
@@ -783,8 +783,14 @@ static status_t process_request(private_task_manager_t *this,
                                                                                                           this->dpd_recv++);
                                        dpd = TRUE;
                                }
-                               else if (message->get_notify(message, DPD_R_U_THERE_ACK))
+                               else if ((notify = message->get_notify(message,
+                                                                                                          DPD_R_U_THERE_ACK)))
                                {
+                                       data = notify->get_notification_data(notify);
+                                       if (data.len == 4 && untoh32(data.ptr) == this->dpd_send)
+                                       {
+                                               this->dpd_send++;
+                                       }
                                        task = (task_t *)isakmp_dpd_create(this->ike_sa, TRUE,
                                                                                                           this->dpd_send - 1);
                                        dpd = TRUE;