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>
{
int ret;
- if (!vpninfo->vpnc_script)
+ if (!vpninfo->vpnc_script || vpninfo->script_tun)
return 0;
setenv("reason", reason, 1);