Skip to content

Commit

Permalink
add option --reconnect-timeout
Browse files Browse the repository at this point in the history
Users could specify large reconnect-timeout to
survive unstable network connections.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Wu, Fengguang authored and David Woodhouse committed Dec 12, 2008
1 parent d4f2bdf commit bd761ea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.c
Expand Up @@ -74,6 +74,7 @@ static struct option long_options[] = {
{"cookie-on-stdin", 0, 0, '4'},
{"passwd-on-stdin", 0, 0, '5'},
{"no-passwd", 0, 0, '6'},
{"reconnect-timeout", 1, 0, '7'},
{NULL, 0, 0, 0},
};

Expand Down Expand Up @@ -108,6 +109,7 @@ void usage(void)
printf(" --no-dtls Disable DTLS\n");
printf(" --no-passwd Disable password/SecurID authentication\n");
printf(" --passwd-on-stdin Read password from standard input\n");
printf(" --reconnect-timeout Connection retry timeout in seconds\n");
exit(1);
}

Expand Down Expand Up @@ -198,6 +200,9 @@ int main(int argc, char **argv)
case '6':
vpninfo->nopasswd = 1;
break;
case '7':
vpninfo->reconnect_timeout = atoi(optarg);
break;
case 'C':
vpninfo->cookie = optarg;
break;
Expand Down
8 changes: 8 additions & 0 deletions openconnect.8
Expand Up @@ -99,6 +99,9 @@ openconnect \- Connect to Cisco AnyConnect VPN
[
.B --passwd-on-stdin
]
[
.B --reconnect-timeout
]
\fIserver\fR

.SH DESCRIPTION
Expand Down Expand Up @@ -218,6 +221,11 @@ Never attempt password (or SecurID) authentication
.TP
.B --passwd-on-stdin
Read password from standard input
.TP
.B --reconnect-timeout
Keep reconnect attempts until so much seconds are elapsed. The default
timeout is 300 seconds, which means that openconnect can recover
VPN connection after a temporary network down time of 300 seconds.

.SH LIMITATIONS
The
Expand Down

0 comments on commit bd761ea

Please sign in to comment.