From: Antonio Quartulli
Date: Sat, 22 Oct 2022 20:55:21 +0000 (+0200)
Subject: close_tun: print interface type consistently in message
X-Git-Tag: v2.6_beta1~40
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77829be280b3b280f35d1ca4947900f3c5e5dd26;p=thirdparty%2Fopenvpn.git
close_tun: print interface type consistently in message
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
Message-Id: <20221022205521.29406-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25449.html
Signed-off-by: Gert Doering
---
diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index c48048a1b..fe554ffd5 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)