@@ -1876,6 +1876,7 @@
open_tun(c->options.dev, c->options.dev_type, c->options.dev_node,
tt, &c->net_ctx);
}
+ msg(M_INFO, "%s device [%s] opened", print_tun_backend_driver(tt->backend_driver), tt->actual_name);
}
@@ -2056,7 +2057,7 @@
do_close_tun_simple(struct context *c)
{
msg(D_CLOSE, "Closing %s interface",
- dco_enabled(&c->options) ? "DCO" : "TUN/TAP");
+ print_tun_backend_driver(c->c1.tuntap->backend_driver));
if (c->c1.tuntap)
{
@@ -6680,7 +6680,6 @@
* GUID using the registry */
tt->actual_name = string_alloc((const char *)actual_buffer, NULL);
- msg(M_INFO, "%s device [%s] opened", print_tun_backend_driver(tt->backend_driver), tt->actual_name);
tt->adapter_index = get_adapter_index(*device_guid);
}
@@ -363,6 +363,12 @@
void warn_on_use_of_common_subnets(openvpn_net_ctx_t *ctx);
+/**
+ * Return a string representation of the tun backed driver type
+ */
+const char *
+print_tun_backend_driver(enum tun_driver_type driver);
+
/*
* Should ifconfig be called before or after
* tun dev open?
@@ -695,9 +701,6 @@
return tuntap_is_dco_win(tt) && (status < 0) && (openvpn_errno() == ERROR_NETNAME_DELETED);
}
-const char *
-print_tun_backend_driver(enum tun_driver_type driver);
-
#else /* ifdef _WIN32 */
static inline bool
Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/749?usp=email to review the following change. Change subject: Use print_tun_backend_driver instead of custom code to print type ...................................................................... Use print_tun_backend_driver instead of custom code to print type Also show the device type that we opened always instead of certain conditions only. Change-Id: Ib8f12516dbe294e21d3fed77478fb7660d4600c1 Signed-off-by: Arne Schwabe <arne@rfc2549.org> --- M src/openvpn/init.c M src/openvpn/tun.c M src/openvpn/tun.h 3 files changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/49/749/1