From c7297e28cf9057f5123a9a0312488f26cbbf7952 Mon Sep 17 00:00:00 2001 From: Denis Vinogradov Date: Tue, 10 Nov 2020 16:14:33 +0900 Subject: [PATCH] [APR-6039]set retransmit count for connection termination to 1 [JIRA]: RAMEN9610-21788 [Problem]: Connection termination takes 15 seconds. It is too long and during that time user may change settings. [Issue]: Retransmit count for terminate is same as for initiate and we need to wait until procedure completed before send response to framework. [Solution]: Set retransmit count to 1. If no response received, close connection locally. Change-Id: Ib5273fc1228e089e8e99beed057266db78dffafb Signed-off-by: Denis Vinogradov --- src/libcharon/sa/ikev2/task_manager_v2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libcharon/sa/ikev2/task_manager_v2.c b/src/libcharon/sa/ikev2/task_manager_v2.c index ff656e4..37be4b5 100755 --- a/src/libcharon/sa/ikev2/task_manager_v2.c +++ b/src/libcharon/sa/ikev2/task_manager_v2.c @@ -379,6 +379,11 @@ METHOD(task_manager_t, retransmit, status_t, base = peer_cfg->get_retransmit_base(peer_cfg); max_tries = peer_cfg->get_retransmit_retries(peer_cfg); } + /* reset values if deleting */ + if (this->ike_sa->is_terminated_from_service(this->ike_sa)) + { + max_tries = 1; + } } DBG1(DBG_IKE, "Retries: %d, range: %d\n", this->initiating.retransmitted, max_tries); -- 2.20.1