Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add 'attempt-reconnect' vpnc-script reason
In https://gitlab.com/openconnect/openconnect/issues/17 we think we need
to give the vpnc-script a chance to reinstate the host route to the VPN
server before we can reconnect.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
dwmw2 committed Jan 16, 2019
1 parent 605a802 commit c2755ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ssl.c
Expand Up @@ -1012,7 +1012,12 @@ int ssl_reconnect(struct openconnect_info *vpninfo)
free(vpninfo->tun_pkt);
vpninfo->tun_pkt = NULL;

while ((ret = vpninfo->proto->tcp_connect(vpninfo))) {
while (1) {
script_config_tun(vpninfo, "attempt-reconnect");
ret = vpninfo->proto->tcp_connect(vpninfo);
if (!ret)
break;

if (timeout <= 0)
return ret;
if (ret == -EPERM) {
Expand Down
1 change: 1 addition & 0 deletions www/changelog.xml
Expand Up @@ -21,6 +21,7 @@
<li>Fix GnuTLS builds without libtasn1.</li>
<li>Fix DTLS support with OpenSSL 1.1.1+.</li>
<li>Add Cisco-compatible DTLSv1.2 support.</li>
<li>Invoke script with <tt>reason=attempt-reconnect</tt> before doing so.</li>
</ul><br/>
</li>
<li><b><a href="ftp://ftp.infradead.org/pub/openconnect/openconnect-8.01.tar.gz">OpenConnect v8.01</a></b>
Expand Down

0 comments on commit c2755ee

Please sign in to comment.