From: Antonio Quartulli Date: Sat, 22 Oct 2022 22:55:21 +0200 Message-Id: <20221022205521.29406-1-a@...2181...> In-Reply-To: 20220818001358.175361-1-a@...2181... References: MIME-Version: 1.0 Subject: [Openvpn-devel] [PATCH v2] close_tun: print interface type consistently in message List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net Cc: Antonio Quartulli 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(-) 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) -- 2.37.4