]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commit
Always use INTERNAL_IP4_ADDRESS as "gateway" on Windows
authorDaniel Lenski <dlenski@gmail.com>
Tue, 30 Nov 2021 18:06:44 +0000 (10:06 -0800)
committerDaniel Lenski <dlenski@gmail.com>
Tue, 30 Nov 2021 18:08:25 +0000 (10:08 -0800)
commita850bc40d454041ed58f461cf35d7065013b1f90
tree6af78ed106ec13e2c11bec9292509dbe4ab0e545
parent1d35a8527e5422967514dd1d47350ff2ede55903
Always use INTERNAL_IP4_ADDRESS as "gateway" on Windows

It appears that Windows's 'netsh' utility doesn't like the VPN interface
having a "gateway" address of 0.0.0.1, which is what vpnc-script-win.js
would attempt to use if INTERNAL_IP4_NETMASK is /0.  See
https://gitlab.com/openconnect/openconnect/-/merge_requests/306#note_745139972.

As noted in the OpenConnect source, "It's a tunnel; having a gateway is
meaningless."

Setting the "gateway" address for Windows to match INTERNAL_IP4_ADDRESS
seems like the simplest way to make 'netsh' configure routingly correctly in
all cases, including when the INTERNAL_IP4_NETMASK is either /0 or /32.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
vpnc-script-win.js