Skip to content

Commit

Permalink
tun: Don't call tunnel script on reconnect events
Browse files Browse the repository at this point in the history
If --script-tun is used, the vpnc_script is not invoked for pre-init,
connect, or disconnect events.  However, it is invoked on reconnect, and
this may confuse the tunnel script.

Add an extra check to script_config_tun() to make the reconnect behavior
consistent with the behavior of other events.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
cernekee authored and David Woodhouse committed Nov 14, 2012
1 parent ada3dea commit 4bde161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tun.c
Expand Up @@ -376,7 +376,7 @@ int script_config_tun(struct openconnect_info *vpninfo, const char *reason)
{
int ret;

if (!vpninfo->vpnc_script)
if (!vpninfo->vpnc_script || vpninfo->script_tun)
return 0;

setenv("reason", reason, 1);
Expand Down

0 comments on commit 4bde161

Please sign in to comment.