From patchwork Sun Jul 19 21:08:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 1309 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id UO5ZKxBDFV9FBQAAIUCqbw for ; Mon, 20 Jul 2020 03:09:04 -0400 Received: from proxy19.mail.ord1d.rsapps.net ([172.30.191.6]) by director8.mail.ord1d.rsapps.net with LMTP id gBgoKxBDFV8DZgAAfY0hYg ; Mon, 20 Jul 2020 03:09:04 -0400 Received: from smtp22.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy19.mail.ord1d.rsapps.net with LMTP id YF+nKhBDFV+nMwAAyH2SIw ; Mon, 20 Jul 2020 03:09:04 -0400 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: smtp22.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=greenie.muc.de X-Suspicious-Flag: YES X-Classification-ID: e44ec350-ca57-11ea-93bf-5254001a15c2-1-1 Received: from [216.105.38.7] ([216.105.38.7:37488] helo=lists.sourceforge.net) by smtp22.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id C7/7A-29944-F03451F5; Mon, 20 Jul 2020 03:09:03 -0400 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jxPuJ-0004k0-My; Mon, 20 Jul 2020 07:08:15 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jxPuH-0004je-NG for openvpn-devel@lists.sourceforge.net; Mon, 20 Jul 2020 07:08:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: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=cBKDc6NLRLpGSz7cHSD8hFKytg96q/UwQjsjXbV8fRk=; b=bQam4ix6/49nbA65cYjziLl4Z8 2J5Pn74AE5Yc1wYocLHZysG6VnHZmqih41JRiyIuE1Ay+IyUqItO/H0x0bgOt87QSeYe0SsQyfGZR 1+ju4JyMZSVCwDqKTKO8ZXpZYArBuKGL3pTxmA73axOf6MGQLqt3TAMyJNJ059XfOeqs=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Type: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=cBKDc6NLRLpGSz7cHSD8hFKytg96q/UwQjsjXbV8fRk=; b=L hP18OG0X3msjk3dizp/nfdUci9wxazmR1zMNCRv9YkrbMnlDeXC/LydGq/xIsT9dwNoPTnGSL+wmX OWzP6RbI/7TStIFiVsfScXsGnJeNZzxTBERRc2lkExIydmDFpq7HPg8xWRXeFTlVUCgXZ3lxjuopH PtBqyYVaOkDgPGDY=; Received: from vmail1.greenie.net ([195.30.8.66]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jxPuF-000s7I-Bd for openvpn-devel@lists.sourceforge.net; Mon, 20 Jul 2020 07:08:13 +0000 Received: from gentoo.ov.greenie.net (gentoo.ov.greenie.net [IPv6:2001:608:0:814:0:0:f000:11]) by vmail1.greenie.net (8.15.2/8.12.11) with SMTP id 06K782ev093951 for ; Mon, 20 Jul 2020 09:08:02 +0200 (CEST) Received: (nullmailer pid 18865 invoked by uid 1000); Mon, 20 Jul 2020 07:08:02 -0000 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 20 Jul 2020 09:08:02 +0200 Message-Id: <20200720070802.18819-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (vmail1.greenie.net [IPv6:2001:608:1:995a:20c:29ff:feb8:10eb]); Mon, 20 Jul 2020 09:08:02 +0200 (CEST) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1jxPuF-000s7I-Bd Subject: [Openvpn-devel] [PATCH] Separate handling of non-deferred return values for client-connect-scripts. 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox (Only) on "CC_RET_SUCCESS", run multi_client_connect_post(). On "CC_RET_FAILURE", add missing log line, do not call ..._post(). Signed-off-by: Gert Doering Acked-By: Arne Schwabe --- src/openvpn/multi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 08112c98..e99de713 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -2139,13 +2139,19 @@ multi_client_connect_script_deferred(struct multi_context *m, ret = CC_RET_DEFERRED; } - if (ret != CC_RET_DEFERRED) + if (ret == CC_RET_SUCCEEDED) { ccs_delete_deferred_ret_file(mi); multi_client_connect_post(m, mi, ccs->config_file, option_types_found); ccs_delete_config_file(mi); } + if (ret == CC_RET_FAILED) + { + msg(M_INFO, "MULTI: deferred --client-connect script returned CC_RET_FAILED"); + ccs_delete_deferred_ret_file(mi); + ccs_delete_config_file(mi); + } return ret; }