Skip to content

Commit

Permalink
When using a tun device, do not try to kill pppd
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos committed Feb 25, 2023
1 parent a270763 commit 6cad092
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6cad092

Please sign in to comment.