From c2755eefb4e00e915c330495b33d3f5db926615b Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 15 Jan 2019 17:16:08 +0200 Subject: [PATCH] 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 --- ssl.c | 7 ++++++- www/changelog.xml | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ssl.c b/ssl.c index 29250a09..eb32f380 100644 --- a/ssl.c +++ b/ssl.c @@ -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) { diff --git a/www/changelog.xml b/www/changelog.xml index 2b57db93..2ae89738 100644 --- a/www/changelog.xml +++ b/www/changelog.xml @@ -21,6 +21,7 @@
  • Fix GnuTLS builds without libtasn1.
  • Fix DTLS support with OpenSSL 1.1.1+.
  • Add Cisco-compatible DTLSv1.2 support.
  • +
  • Invoke script with reason=attempt-reconnect before doing so.

  • OpenConnect v8.01 -- 2.50.1