diff --git a/programs/ziti-edge-tunnel/netif_driver/darwin/utun.h b/programs/ziti-edge-tunnel/netif_driver/darwin/utun.h index 31ead368..7692c74b 100644 --- a/programs/ziti-edge-tunnel/netif_driver/darwin/utun.h +++ b/programs/ziti-edge-tunnel/netif_driver/darwin/utun.h @@ -26,5 +26,6 @@ struct netif_handle_s { }; extern netif_driver utun_open(char *error, size_t error_len, const char *cidr); +extern const char* get_tun_name(netif_handle tun); #endif //ZITI_TUNNELER_SDK_UTUN_H diff --git a/programs/ziti-edge-tunnel/netif_driver/linux/tun.h b/programs/ziti-edge-tunnel/netif_driver/linux/tun.h index 73c83cd8..2274b986 100644 --- a/programs/ziti-edge-tunnel/netif_driver/linux/tun.h +++ b/programs/ziti-edge-tunnel/netif_driver/linux/tun.h @@ -29,5 +29,6 @@ struct netif_handle_s { }; extern netif_driver tun_open(struct uv_loop_s *loop, uint32_t tun_ip, uint32_t dns_ip, const char *cidr, char *error, size_t error_len); +extern const char* get_tun_name(netif_handle tun); #endif //ZITI_TUNNELER_SDK_TUN_H diff --git a/programs/ziti-edge-tunnel/ziti-edge-tunnel.c b/programs/ziti-edge-tunnel/ziti-edge-tunnel.c index bc09a74e..99808069 100644 --- a/programs/ziti-edge-tunnel/ziti-edge-tunnel.c +++ b/programs/ziti-edge-tunnel/ziti-edge-tunnel.c @@ -1317,13 +1317,15 @@ static void run(int argc, char *argv[]) { //set log level in precedence: command line flag (-v/--verbose) -> env var (ZITI_LOG) -> config file int log_level = get_log_level(configured_log_level); + log_writer log_fn = NULL; #if _WIN32 signal(SIGINT, interrupt_handler); log_init(global_loop_ref, log_level, ziti_log_writer); // level from config file set below + log_fn = ziti_log_writer; remove_all_nrpt_rules(DEFAULT_EXECUTABLE_NAME, false); //remove all rules starting with ziti-edge-tunnel #else - ziti_log_init(global_loop_ref, log_level, ziti_log_writer); + ziti_log_init(global_loop_ref, log_level, log_fn); #endif // generate tunnel status instance and save active state and start time