Skip to content

Commit

Permalink
pass IDLE_TIMEOUT to configuration script
Browse files Browse the repository at this point in the history
`vpninfo->idle_timeout` was added in
37fbeed, for use by the Java API and
Android ics-openconnect, which uses it to keep the connection alive at
appropriate intervals.

This patch makes this variable available to the normal vpnc-script used by
OpenConnect, so that it can likewise spawn a keepalive process if desired.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
  • Loading branch information
dlenski committed Oct 23, 2019
1 parent f91b42b commit 9182af6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions script.c
Expand Up @@ -226,6 +226,11 @@ void prepare_script_env(struct openconnect_info *vpninfo)

script_setenv_int(vpninfo, "INTERNAL_IP4_MTU", vpninfo->ip_info.mtu);

if (vpninfo->idle_timeout)
script_setenv_int(vpninfo, "IDLE_TIMEOUT", vpninfo->idle_timeout);
else
script_setenv(vpninfo, "IDLE_TIMEOUT", NULL, 0, 0);

if (vpninfo->ip_info.addr) {
script_setenv(vpninfo, "INTERNAL_IP4_ADDRESS", vpninfo->ip_info.addr, 0, 0);
if (vpninfo->ip_info.netmask) {
Expand Down

0 comments on commit 9182af6

Please sign in to comment.