Skip to content

Commit 6cad092

Browse files
When using a tun device, do not try to kill pppd
1 parent a270763 commit 6cad092

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/tunnel.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,8 +1467,10 @@ int run_tunnel(struct vpn_config *config)
14671467
tunnel.state = STATE_DISCONNECTING;
14681468

14691469
err_start_tunnel:
1470-
ret = pppd_terminate(&tunnel);
1471-
log_info("Terminated %s.\n", PPP_DAEMON);
1470+
if (!tunnel.use_tun) {
1471+
ret = pppd_terminate(&tunnel);
1472+
log_info("Terminated %s.\n", PPP_DAEMON);
1473+
}
14721474
err_tunnel:
14731475
log_info("Closed connection to gateway.\n");
14741476
tunnel.state = STATE_DOWN;

0 commit comments

Comments
 (0)