From: Kevin Cernekee Date: Wed, 14 Nov 2012 03:00:24 +0000 (-0800) Subject: tun: Don't call tunnel script on reconnect events X-Git-Tag: v4.99~14 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4bde16100ba05b162cf24311b4a77b34860c577b;p=users%2Fdwmw2%2Fopenconnect.git tun: Don't call tunnel script on reconnect events 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 Signed-off-by: David Woodhouse --- diff --git a/tun.c b/tun.c index 3538f3cb..831c11eb 100644 --- a/tun.c +++ b/tun.c @@ -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);