ikev2: Reduce timeout if path probing was enabled
authorTobias Brunner <tobias@strongswan.org>
Mon, 28 Jul 2014 12:09:10 +0000 (14:09 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 12 Sep 2014 08:29:37 +0000 (10:29 +0200)
src/libcharon/sa/ikev2/task_manager_v2.c

index c73bf01..58f6bc6 100644 (file)
@@ -274,13 +274,20 @@ METHOD(task_manager_t, retransmit, status_t,
                                packet = this->initiating.packet->clone(this->initiating.packet);
                                charon->sender->send(charon->sender, packet);
                        }
-                       else if (!mobike->transmit(mobike, this->initiating.packet))
+                       else
                        {
-                               DBG1(DBG_IKE, "no route found to reach peer, MOBIKE update "
-                                        "deferred");
-                               this->ike_sa->set_condition(this->ike_sa, COND_STALE, TRUE);
-                               this->initiating.deferred = TRUE;
-                               return SUCCESS;
+                               if (!mobike->transmit(mobike, this->initiating.packet))
+                               {
+                                       DBG1(DBG_IKE, "no route found to reach peer, MOBIKE update "
+                                                "deferred");
+                                       this->ike_sa->set_condition(this->ike_sa, COND_STALE, TRUE);
+                                       this->initiating.deferred = TRUE;
+                                       return SUCCESS;
+                               }
+                               else if (mobike->is_probing(mobike))
+                               {
+                                       timeout = ROUTEABILITY_CHECK_INTERVAL;
+                               }
                        }
                }
                else