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 <a...@unstable.cc>
---
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



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to