From patchwork Sat Oct 22 09:55:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 2829 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director13.mail.ord1d.rsapps.net ([172.27.255.59]) by backend30.mail.ord1d.rsapps.net with LMTP id rg5tBvNYVGNYOwAAIUCqbw (envelope-from ) for ; Sat, 22 Oct 2022 16:56:19 -0400 Received: from proxy11.mail.iad3a.rsapps.net ([172.27.255.59]) by director13.mail.ord1d.rsapps.net with LMTP id YK1+BfNYVGOXWwAA91zNiA (envelope-from ) for ; Sat, 22 Oct 2022 16:56:19 -0400 Received: from smtp36.gate.iad3a ([172.27.255.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy11.mail.iad3a.rsapps.net with LMTPS id 4IgMOvJYVGMeOwAAxCvdqw (envelope-from ) for ; Sat, 22 Oct 2022 16:56:18 -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: smtp36.gate.iad3a.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; dkim=fail (signature verification failed) header.d=unstable.cc; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: f9816f24-524b-11ed-bfeb-525400575b2b-1-1 Received: from [216.105.38.7] ([216.105.38.7:34532] helo=lists.sourceforge.net) by smtp36.gate.iad3a.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id B0/CF-18604-2F854536; Sat, 22 Oct 2022 16:56:18 -0400 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1omLX2-0007n6-Vg; Sat, 22 Oct 2022 20:55:48 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1omLWx-0007mz-RA for openvpn-devel@lists.sourceforge.net; Sat, 22 Oct 2022 20:55:43 +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:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+qvdOfupbxn0oCOWjqSgnbsSyPI19yOW6atncIQS534=; b=RYtonCJ5jPIgN17TZFJ4t35Rfb iDwicuG4nHCAugMfPAf0Vl/sFvaW9afchhI+FjdYzp5U46hflUJPVCdxBqLl6giAmIcvx5zIObPKQ X2N/Kp24cScv5rKvrQQTpinlfJfcxtu8EMbw9VoG76mZHbDMqNo5irq228JxTKXRS3vw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+qvdOfupbxn0oCOWjqSgnbsSyPI19yOW6atncIQS534=; b=LAaLDsIwe5g9As9HZDpz+hnIqj jTwOAUMDmxK2N2PJ7a7jNzkIlnXRczH2Hjfc2hdzIN8o2Go8WzoPZqh6EBioITAcVTzYuGKNbGEzx xjXT5/0tV6QlTBUFeekTuQbxvPCqZ5w+FMhaADuF+/4xeGj4n8uWaT+8sbr6QWIbjjLo=; Received: from wilbur.contactoffice.com ([212.3.242.68]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1omLWp-0002Zu-8L for openvpn-devel@lists.sourceforge.net; Sat, 22 Oct 2022 20:55:43 +0000 Received: from smtpauth1.co-bxl (smtpauth1.co-bxl [10.2.0.15]) by wilbur.contactoffice.com (Postfix) with ESMTP id 442EFE8A; Sat, 22 Oct 2022 22:55:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1666472128; s=20220809-q8oc; d=unstable.cc; i=a@unstable.cc; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; l=843; bh=+qvdOfupbxn0oCOWjqSgnbsSyPI19yOW6atncIQS534=; b=DjlCw2M3B5yWl05GSbDwOHyATyU93mMyIE4Ycxw9NvNsiJUUY8DpDPyywog/gXZa B7HiOmvC0rUODtkOszERHy0nJH7QCrp2Oznoqa3vWgbQycH8JWuTqH0WxK4v8ncZhSC kVQcUEcfzSkZNQ/iptLlKKMAapWx9Ulv1Hg/1ZHxtSl6J6UZxT5FFP28qjyiBGdahRM pjsi1H1c8b03HKKfeKEH6esAPuVmjTAJQR7fO+rAk2j1yAQyt8zs5qgKuHWEwg/v1ND jKFv5jvOl/1uGiJgYRfRmIrm9qZzjOVMFY90WQ/w95sc8HeeWJg26Kph+hBxs3wD1Hq qQacOHhL5Q== Received: by smtp.mailfence.com with ESMTPSA ; Sat, 22 Oct 2022 22:55:24 +0200 (CEST) From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Sat, 22 Oct 2022 22:55:21 +0200 Message-Id: <20221022205521.29406-1-a@unstable.cc> X-Mailer: git-send-email 2.37.4 In-Reply-To: 20220818001358.175361-1-a@unstable.cc References: MIME-Version: 1.0 X-Spam-Status: No, hits=-2.9 required=4.7 symbols=ALL_TRUSTED, BAYES_00 device=10.2.0.1 X-ContactOffice-Account: com:375058688 X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: When closing the tunnel interface we know if we were using DCO or not. for this reason we can customize the closing message and make it consistent with the opening one. Signed-off-by: Antonio Quartulli --- Changes from v1: * use termary if instead of full blown if block --- src/openvpn/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Content analysis details: (-0.9 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 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: unstable.cc] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.3.242.68 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1omLWp-0002Zu-8L Subject: [Openvpn-devel] [PATCH v2] close_tun: print interface type consistently in message 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: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox When closing the tunnel interface we know if we were using DCO or not. for this reason we can customize the closing message and make it consistent with the opening one. Signed-off-by: Antonio Quartulli Acked-by: Gert Doering --- Changes from v1: * use termary if instead of full blown if block --- src/openvpn/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index c48048a1..01d6dab5 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -1946,7 +1946,9 @@ do_open_tun(struct context *c) static void do_close_tun_simple(struct context *c) { - msg(D_CLOSE, "Closing TUN/TAP interface"); + msg(D_CLOSE, "Closing %s interface", + dco_enabled(&c->options) ? "DCO": "TUN/TAP"); + if (c->c1.tuntap) { if (!c->options.ifconfig_noexec)