ikev2: add retry logic for session initiation
Type: improvement Change-Id: Ib474dabb745bc2034d8d60261c095e35a8fff277 Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
This commit is contained in:

committed by
Damjan Marion

parent
a9d8cb494f
commit
ba46770636
@ -3742,6 +3742,31 @@ ikev2_mngr_process_ipsec_sa (ipsec_sa_t * ipsec_sa)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ikev2_process_pending_sa_init (ikev2_main_t * km)
|
||||||
|
{
|
||||||
|
u32 sai;
|
||||||
|
u64 ispi;
|
||||||
|
ikev2_sa_t *sa;
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
hash_foreach (ispi, sai, km->sa_by_ispi,
|
||||||
|
({
|
||||||
|
sa = pool_elt_at_index (km->sais, sai);
|
||||||
|
u32 bi0;
|
||||||
|
if (vlib_buffer_alloc (km->vlib_main, &bi0, 1) != 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
vlib_buffer_t * b = vlib_get_buffer (km->vlib_main, bi0);
|
||||||
|
clib_memcpy_fast (vlib_buffer_get_current (b),
|
||||||
|
sa->last_sa_init_req_packet_data,
|
||||||
|
vec_len (sa->last_sa_init_req_packet_data));
|
||||||
|
ikev2_send_ike (km->vlib_main, &sa->iaddr, &sa->raddr, bi0,
|
||||||
|
vec_len (sa->last_sa_init_req_packet_data));
|
||||||
|
}));
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
}
|
||||||
|
|
||||||
static vlib_node_registration_t ikev2_mngr_process_node;
|
static vlib_node_registration_t ikev2_mngr_process_node;
|
||||||
|
|
||||||
static uword
|
static uword
|
||||||
@ -3790,6 +3815,8 @@ ikev2_mngr_process_fn (vlib_main_t * vm, vlib_node_runtime_t * rt,
|
|||||||
}));
|
}));
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
|
ikev2_process_pending_sa_init (km);
|
||||||
|
|
||||||
if (req_sent)
|
if (req_sent)
|
||||||
{
|
{
|
||||||
vlib_process_wait_for_event_or_clock (vm, 5);
|
vlib_process_wait_for_event_or_clock (vm, 5);
|
||||||
|
Reference in New Issue
Block a user