From patchwork Tue Dec 15 06:39:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Domagoj Pensa X-Patchwork-Id: 1553 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id yMKNI0r12F/gYAAAIUCqbw (envelope-from ) for ; Tue, 15 Dec 2020 12:41:30 -0500 Received: from proxy10.mail.ord1d.rsapps.net ([172.30.191.6]) by director9.mail.ord1d.rsapps.net with LMTP id INY7I0r12F+bDgAAalYnBA (envelope-from ) for ; Tue, 15 Dec 2020 12:41:30 -0500 Received: from smtp29.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy10.mail.ord1d.rsapps.net with LMTPS id 8IsfI0r12F8sXQAAfSg8FQ (envelope-from ) for ; Tue, 15 Dec 2020 12:41:30 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp29.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=pensa.hr X-Suspicious-Flag: YES X-Classification-ID: c2e70ce4-3efc-11eb-a9a1-525400f257a9-1-1 Received: from [216.105.38.7] ([216.105.38.7:53656] helo=lists.sourceforge.net) by smtp29.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id A3/F3-03513-945F8DF5; Tue, 15 Dec 2020 12:41:29 -0500 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kpEJR-00012o-SX; Tue, 15 Dec 2020 17:40:37 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpEJ9-00011p-5P for openvpn-devel@lists.sourceforge.net; Tue, 15 Dec 2020 17:40:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Date:Subject:Message-ID:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+g6SFpjg9eyUFckRSrIoOgv5ymp/6pp1PipLfMOSSbo=; b=mnEGtF9TnFp0p5Bq7lIkoWtyMA adEz8efX203UKuISe94q8cey6N+IBc/vydas3ZK6nsO6c0HSkejJVmMmbux8iJNRRMy3XRJQocAR2 b47mLdjIFPBFDz/P+uukyonVrgk21ewCIPXaMTa7crnvau9l8ZcM+1mYUVoLvMIi8J/Q=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Date:Subject: Message-ID:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+g6SFpjg9eyUFckRSrIoOgv5ymp/6pp1PipLfMOSSbo=; b=kwSofHg6bILAhCU7es7Fnt4m7I s8Kw2CCcIBDFiBk4Y8aWE4CA09aXsi6iZKpbvlNX4zOATKKdIBzSGA/x1jgfCmArg4+w5nRkQlV81 lnRkuQjIvWSAQaSM1tbTnGAWBVyTrGWbO9azLMCUhIcJBjV1oimkL0dQVGA4NKrZIQ+k=; Received: from sender4-of-o50.zoho.com ([136.143.188.50]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1kpEJ0-00EZT5-2W for openvpn-devel@lists.sourceforge.net; Tue, 15 Dec 2020 17:40:19 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1608053995; cv=none; d=zohomail.com; s=zohoarc; b=RiumIfQimvdlejYPRrsVQ/aM9E81bw1AJFOrMigwBiZTk5nCDU7BRxBVNuTvpMEk9QiqBrGR+QsTJTkjSivQOTr/gcfm8cpgUX1X4vgigRqAPATzi3xOIpsW5Sl21cgjUX7GkqD4Yq41oDciclr72Nj8NLy+e/3aN7Y+NZ27nGo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608053995; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=+g6SFpjg9eyUFckRSrIoOgv5ymp/6pp1PipLfMOSSbo=; b=Niq0S1AjMc5ea1Ds3TFgo3ibmC6alj3bFnbe/1udrYQUeRSqgZ1ngfz/HaEeycsGqsrhefOkZxUuQEQAGhTxIfeLePmEo2ZafhWKl8EoeF4OybImTcOmek73IKAPn9knBClCZzk8wRNPwTjLlbZbTqeeP7Ot+Fj4IEmUWXdfjmI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass smtp.mailfrom=domagoj@pensa.hr; dmarc=pass header.from= header.from= Received: from localhost (21-233.dsl.iskon.hr [89.164.21.233]) by mx.zohomail.com with SMTPS id 1608053992795858.4348844007524; Tue, 15 Dec 2020 09:39:52 -0800 (PST) From: Domagoj Pensa To: openvpn-devel@lists.sourceforge.net Message-ID: <20201215173950.26596-1-domagoj@pensa.hr> Date: Tue, 15 Dec 2020 18:39:50 +0100 X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-ZohoMailClient: External X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: pensa.hr] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [136.143.188.50 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [136.143.188.50 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Headers-End: 1kpEJ0-00EZT5-2W Subject: [Openvpn-devel] [PATCH] Remove 1 second delay before running netsh X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Domagoj Pensa Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox When running various netsh commands before each 1 second sleep is added. As more netsh commands are run, especially for Wintun adapters, that can add to a noticable delayed connecting time. This should be safe. No problems were found in tests and all netsh commands executed properly with delay removed. Also, no delays are used in a similar code in interactive service and netsh command executions are guarded with a semaphore. Signed-off-by: Domagoj Pensa --- src/openvpn/tun.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 400a50ca..e9f1aadb 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -5207,7 +5207,6 @@ netsh_command(const struct argv *a, int n, int msglevel) for (i = 0; i < n; ++i) { bool status; - management_sleep(1); netcmd_semaphore_lock(); argv_msg_prefix(M_INFO, a, "NETSH"); status = openvpn_execve_check(a, NULL, 0, "ERROR: netsh command failed");