From 249fb94448bcdf7ec298f666c2df1de172060d79 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Thu, 15 Dec 2022 08:58:11 +0100 Subject: [PATCH] WHen using a tun device, do not try to kill pppd --- src/tunnel.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tunnel.c b/src/tunnel.c index c3d5094f..412dc260 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -1467,8 +1467,10 @@ int run_tunnel(struct vpn_config *config) tunnel.state = STATE_DISCONNECTING; err_start_tunnel: - ret = pppd_terminate(&tunnel); - log_info("Terminated %s.\n", PPP_DAEMON); + if (!tunnel.use_tun) { + ret = pppd_terminate(&tunnel); + log_info("Terminated %s.\n", PPP_DAEMON); + } err_tunnel: log_info("Closed connection to gateway.\n"); tunnel.state = STATE_DOWN;