Browse Source

openconnect: added fix for handshake timeout

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
lilik-openwrt-22.03
Nikos Mavrogiannopoulos 10 years ago
parent
commit
fa34d7ec9f
2 changed files with 32 additions and 1 deletions
  1. +1
    -1
      net/openconnect/Makefile
  2. +31
    -0
      net/openconnect/patches/001-Added-a-default-timeout-value-in-CSTP-handshake-usin.patch

+ 1
- 1
net/openconnect/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openconnect
PKG_VERSION:=6.00
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/


+ 31
- 0
net/openconnect/patches/001-Added-a-default-timeout-value-in-CSTP-handshake-usin.patch View File

@ -0,0 +1,31 @@
From 826ad45a86f1556910c2f00dfa6477879deb978f Mon Sep 17 00:00:00 2001
From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Date: Thu, 24 Jul 2014 21:59:01 +0200
Subject: [PATCH] Added a default timeout value in CSTP handshake using gnutls
[dwmw2: move it to openconnect_open_https() so it's done only once]
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
---
gnutls.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gnutls.c b/gnutls.c
index 3e3204a..2ef836c 100644
--- a/gnutls.c
+++ b/gnutls.c
@@ -2017,6 +2017,10 @@ int openconnect_open_https(struct openconnect_info *vpninfo)
vpn_progress(vpninfo, PRG_INFO, _("SSL negotiation with %s\n"),
vpninfo->hostname);
+#ifdef GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT
+ gnutls_handshake_set_timeout(vpninfo->https_sess,
+ GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT);
+#endif
err = cstp_handshake(vpninfo, 1);
if (err)
--
2.0.0

Loading…
Cancel
Save