From 77829be280b3b280f35d1ca4947900f3c5e5dd26 Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Sat, 22 Oct 2022 22:55:21 +0200 Subject: [PATCH] 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 --- 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 c48048a1bd1..fe554ffd577 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)