From: Denis Vinogradov Date: Tue, 10 Nov 2020 07:14:33 +0000 (+0900) Subject: [APR-6039]set retransmit count for connection termination to 1 X-Git-Tag: MMI-RSA31.Q1-48-36-11~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c7297e28cf9057f5123a9a0312488f26cbbf7952;p=GitHub%2FMotorolaMobilityLLC%2Fexternal-strongswan.git [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 --- 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);