Question About vpnc-script-win.js

David Woodhouse dwmw2 at infradead.org
Fri Jan 30 07:43:41 PST 2015


On Fri, 2015-01-30 at 08:31 -0500, Steven Petraglia wrote:
> 
> ::-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> :: Windows7 Run From Current Dir
> ::-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> pushd %~dp0
> 
> set VERBOSE=-v
> 
> set CISCO_SPLIT_INC=2
> set CISCO_SPLIT_INC_0_ADDR = "20.137.0.0"
> set CISCO_SPLIT_INC_0_MASK = "255.255.0.0"
> set CISCO_SPLIT_INC_0_MASKLEN = "32"
> set CISCO_SPLIT_INC_1_ADDR = "170.225.31.0"
> set CISCO_SPLIT_INC_1_MASK = "255.255.255.0"
> set CISCO_SPLIT_INC_1_MASKLEN = "32"
> 
> "openconnect.exe" %VERBOSE%  client.com 

Hah, so *this* is why OpenConnect was crashing. It tries to set these
environment variables according to what the server tells us, and the bug
triggered when it found them already set (I'd coded it to delete
existing conflicting variables from the environment but evidently not
tested it very well).

You need to interpose your script between openconnect and
vpnc-script-win.js, not run it before openconnect.

So run openconnect with '--script routehack.bat', and change
routehack.bat so that it sets those variables and then invokes
vpnc-script-win.js.

Although I think openconnect expects its script to be run with
'cscript.exe' so perhaps it needs to be JavaScript instead of a batch
file.

-- 
dwmw2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20150130/d0f9a7d1/attachment.bin>


More information about the openconnect-devel mailing list