ikev2: increase tick interval in process node 19/29719/4
authorFilip Tehlar <ftehlar@cisco.com>
Fri, 30 Oct 2020 05:59:55 +0000 (05:59 +0000)
committerBeno�t Ganne <bganne@cisco.com>
Wed, 4 Nov 2020 08:07:15 +0000 (08:07 +0000)
This helps to resolve sporadic failures in unit tests.

Type: fix

Change-Id: I3abd77ed74310f9729a841e8569eafe6d7758dcb
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
src/plugins/ikev2/ikev2.c

index f3e159d..5103da0 100644 (file)
@@ -4918,8 +4918,7 @@ ikev2_mngr_process_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
 
   while (1)
     {
-      u8 req_sent = 0;
-      vlib_process_wait_for_event_or_clock (vm, 1);
+      vlib_process_wait_for_event_or_clock (vm, 2);
       vlib_process_get_events (vm, NULL);
 
       /* process ike child sas */
@@ -4946,9 +4945,7 @@ ikev2_mngr_process_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
             sa->old_id_expiration -= 1;
 
           vec_foreach (c, sa->childs)
-            {
-            req_sent |= ikev2_mngr_process_child_sa(sa, c, del_old_ids);
-            }
+            ikev2_mngr_process_child_sa(sa, c, del_old_ids);
 
           if (!km->dpd_disabled && ikev2_mngr_process_responder_sas (sa))
             vec_add1 (to_be_deleted, sa - tkm->sas);
@@ -4989,14 +4986,6 @@ ikev2_mngr_process_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
       /* *INDENT-ON* */
 
       ikev2_process_pending_sa_init (km);
-
-      if (req_sent)
-       {
-         vlib_process_wait_for_event_or_clock (vm, 5);
-         vlib_process_get_events (vm, NULL);
-         req_sent = 0;
-       }
-
     }
   return 0;
 }