Commit Graph

102 Commits

Author SHA1 Message Date
Nikos Mavrogiannopoulos ab8adb7d76 openconnect: introduced URI parameter
This allows specifying a camouflage string in ocserv.

Fixes: #23364

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2024-05-09 22:25:50 +02:00
Nikos Mavrogiannopoulos 75d7b0bf75 openconnect: backport fix for anyconnect compatibility
Fixes: #21135

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2024-05-09 21:22:58 +02:00
Nikos Mavrogiannopoulos 20ea72607b openconnect: make host dependency more resilient
Retry when resolveip fails as it seems to be causing issues
on startup depending on various unpredictable parameters.

Resolves: #23185

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2024-02-16 04:57:48 +01:00
Rosen Penev 02a5264214 openconnect: update to 9.12
Remove upstream backport and fix libxml 1.12 compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-01-02 16:31:21 -08:00
Vladislav Grigoryev 4af0378ef9 openconnect: add support for option --pfs
Add support for the OpenConnect option `--pfs`.
Designed to require perfect forward secrecy.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
2023-10-14 15:30:15 +03:00
Andre Heider 565866a472 treewide: refactor to use PKG_BUILD_FLAGS:=no-mips16
See commit 5c545bdb "treewide: replace PKG_USE_MIPS16:=0 with
PKG_BUILD_FLAGS:=no-mips16" on the main repository.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-04-08 08:38:54 +02:00
Michael Brown 99213e6311 openconnect: Allow reconnect timeout to be specified
Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
2022-08-07 16:20:21 +01:00
Michael Brown 5c84d8ceba openconnect: Support use of a proxy server
Allow connection via a proxy server (required on some sites where
direct outbound HTTP(S) access is not permitted).

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
2022-08-07 16:18:18 +01:00
Rui Salvaterra 916fa87c33 openconnect: make the host dependency optional
According to David Woodhouse, OpenConnect has no issues reconnecting on any
interface. Make the host dependency optional, as it can cause issues in multiple
WAN scenarios.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-01 13:54:13 -07:00
Rui Salvaterra a85bda72cc openconnect: avoid using the --juniper switch
The --juniper switch has been deprecated in favour of --protocol=nc. Fix the
proto script thusly, while keeping compatibility with existing configurations.

Note that, as far as UCI is concerned, if both options juniper and vpn_protocol
are specified, the latter takes precedence.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-01 13:54:13 -07:00
Rui Salvaterra 278a35be9c openconnect: fix inclusion of netifd proto scripts
This is the preferred way, according to the wiki.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-01 13:54:13 -07:00
Rui Salvaterra 2ab669d0b9 Revert "openconnect: drop the dependency on resolveip"
Using resolveip is more robust and predictable than depending on nslookup and
awk.

This reverts commit 131ec7b3bd.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-06-01 13:54:13 -07:00
Rui Salvaterra ae11bdf5d8 openconnect: make sure OpenSSL is built with DTLS support
Otherwise, OpenConnect will fail to connect with DTLS.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-05-24 12:03:06 +01:00
Rui Salvaterra 9bbecd2438 openconnect: don't bother loading the tun module
If it exists (if it isn't built-in), it will be loaded automatically at boot.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-05-23 23:58:42 +01:00
Rui Salvaterra 131ec7b3bd openconnect: drop the dependency on resolveip
We have nslookup and awk, let's use them.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-05-23 23:58:42 +01:00
Rui Salvaterra 1ee8d9c8ff openconnect: fix OpenSSL build without deprecated API
Backport a patch in order to allow building OpenConnect against OpenSSL 1.1.x
without the need for deprecated API (further fixes will be required for OpenSSL
3.x, though).

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-05-20 12:16:18 -07:00
Rui Salvaterra a85a057b14 openconnect: bump to version 9.01
Now with basic support for the Array Networks SSL VPN protocol.

Also fix the OpenSSL build. OpenConnect requires support for deprecated APIs,
for the time being, so select them if compiling against OpenSSL.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-05-12 11:17:59 +01:00
Nikos Mavrogiannopoulos 54360ea2f1 openconnect: updated to 8.20
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2022-02-25 23:30:17 +01:00
Michael Heimpold f2877e81f6 openconnect: fix dependencies to iconv/intl (fixes #14734)
This fixes the issue raised after d18692c (libxml2: allow building with iconv support).

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2021-02-20 19:28:44 +01:00
Frederick Morlock 5d85f5af63 openconnect: Fix secondary password script overwriting primary
When specifying a secondary password script, the output should be appended to the temporary password file and shouldn't overwrite it. If you refer to the case where there is a static secondary password, you can see that the secondary password is appended. Without this fix, only the secondary password is passed to the `openconnect` session.

Signed-off-by: Frederick Morlock <FrederickGeek8@gmail.com>
2021-01-01 17:18:27 +08:00
Mengyang Li b6119433a5 openconnect: allow specify --protocol from config
openconnect v8.10 supports 4 VPN protocols

  --protocol=anyconnect  Compatible with Cisco AnyConnect SSL VPN, as well as ocserv (default)
  --protocol=nc          Compatible with Juniper Network Connect
  --protocol=gp          Compatible with Palo Alto Networks (PAN) GlobalProtect SSL VPN
  --protocol=pulse       Compatible with Pulse Connect Secure SSL VPN

This patch allows user to specify protocol use the new "vpn_protocol"
option and deprecate the old option "juniper" which seems to be missing in
the current openconnect client.

Signed-off-by: Mengyang Li <mayli.he@gmail.com>
2020-10-25 21:44:32 +01:00
Nikos Mavrogiannopoulos f9de9fbb4c openconnect: updated description to reflect current state
Resolves: #13471

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2020-09-23 18:02:49 +02:00
Yousong Zhou 3445e1b470 openconnect: allow disable dtls with bool option no_dtls
openconnect may emit following error logs every minute when negotiating
with deployments forbidding usage of dtls

  Thu Aug 27 04:11:59 2020 daemon.notice openconnect[12024]: DTLS handshake failed: Error in the push function.
  Thu Aug 27 04:11:59 2020 daemon.notice openconnect[12024]: (Is a firewall preventing you from sending UDP packets?)

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-08-27 13:59:52 +08:00
Yousong Zhou fce2b069df openconnect: break each var into its own line in order
For easier review

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-08-27 13:59:35 +08:00
Donald Hoskins c2d4156086 [OpenConnect] Update to version 8.10 to address CVE-2020-12823
https://nvd.nist.gov/vuln/detail/CVE-2020-12823

Signed-off-by: Donald Hoskins <grommish@gmail.com>
2020-06-25 07:37:13 -04:00
Nikos Mavrogiannopoulos d58c3d48a5 openconnect: updated to 8.09
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2020-05-01 19:18:37 +02:00
Marco Gulino 6464166660 openconnect: Allow to set `usergroup` option in OpenConnect
Just adding the extra option `-g|--usergroup <group>` (required by the VPN server I'm currently using)

Signed-off-by: Marco Gulino <marco@gulinux.net>
2020-04-29 22:37:11 +01:00
Jo-Philipp Wich 900ac76bdb openconnect: preserve whitespace in arguments
Properly quote arguments when assembling the command line and eval the
proto_run_command() invocation in order to prevent the shell from
improperly splitting the command arguments on $IFS.

Fixes: #10137
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-03 08:55:54 +01:00
DENG Qingfang 81f6ef0013 openconnect: update to 8.05
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
2019-10-12 15:15:46 +08:00
Yousong Zhou 384398d452 openconnect: allow specifying form_entry list
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2019-09-21 10:33:18 +00:00
Jan Pavlinec 299e5b0a9b
treewide: add PKG_CPE_ID for better cvescanner coverage
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
2019-09-17 12:40:26 +02:00
DENG Qingfang 2c24c1a09e openconnect: update to 8.04
Removed upstream patches

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
2019-08-15 03:07:42 +08:00
Rosen Penev 6dbbc17b1f openconnect: Fix DTLS with OpenSSL
Backported upstream patches that fix this.

Removed local patch that fixes libp11 with version 0.4.7, which is not
used anymore. Upstream has a different solution.

License fixes and Makefile cleanups.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-06-24 10:58:20 -07:00
Nikos Mavrogiannopoulos ebb45bb559 openconnect: updated to 8.03
Resolves: #8218

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2019-05-30 07:31:22 +02:00
Nikos Mavrogiannopoulos 561401ad43 openconnect: updated to 8.01
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2019-01-10 22:16:36 +01:00
Nikos Mavrogiannopoulos aa93ca86db openconnect: build without options we don't support
That is, since we don't require gssapi or libpskc, avoid
accidental builds with it.

Closes #5474

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2018-01-20 23:47:44 +01:00
Yousong Zhou 0d2f9d9bd6 openconnect: fix compilation against libp11 0.4.7
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-12-15 09:50:26 +08:00
Yousong Zhou a9aeab53b9 openconnect: unify indentation in README
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-12-05 09:37:06 +08:00
Gavin Ni ede858fb5d openconnect: support reading password from script
"token_mode" add support for "script", which execute "token_script" to
get the password.  Some token is not supported by OpenConnect natively,
e.g. "MobilePass" or "Softoken II" used in Cisco VPN

Signed-off-by: Gavin Ni <gisngy@gmail.com>
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-12-04 16:00:46 +08:00
Gavin Ni 5d216df6cd openconnect: re-introduce config: interface
In some cases, it's useful to specify which interface to establish the VPN connection

Signed-off-by: Gavin Ni <gisngy@gmail.com>
2017-11-22 10:10:22 +08:00
Vladimir Berezhnoy d710c629e8
openconnect: add options to support juniper
Signed-off-by: Vladimir Berezhnoy <non7top@gmail.com>
2017-11-20 14:03:28 +03:00
Yousong Zhou dbc36c3092 openconnect: openconnect-wrapper: rewrite
- use exec directly to eliminate a level in the process tree
 - use "$@" instead of "$*" to pass arguments to openconnect

According to openconnect(8), openconnect will call vpnc-script to
cleanup before quit when it received SIGINT(2) and will quit immediately
when it received SIGTERM (the default signal by kill command)

Before and after the change, openconnect process will be killed first
with SIGINT sent from netifd.  This was decided by the
'proto_kill_command "$config" 2' notify call in the proto script.

SIGKILL is the only other signal that can be sent from netifd when the
process did not quit on SIGINT on time.  There should be no need to trap
on signal 1 3 6 9 (HUP QUIT ABRT KILL)

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-06-19 12:37:24 +08:00
Yousong Zhou 4034e9ee21 openconnect: new option mtu
According to openconnect --help output:

  -m, --mtu=MTU                   Request MTU from server
      --base-mtu=MTU              Indicate path MTU to/from server

Fixes #2099 by allowing setting tunnel mtu

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-06-18 13:10:34 +02:00
Yousong Zhou 4b3fde326c openconnect: drop stale config: interface
It was introduced with 41f8d5465 ("openconnect: fix a couple of minor
things and add an interface option") and not needed since 4083de9d7
("openconnect: use proto_add_host_dependency")

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2017-06-18 13:10:34 +02:00
Qian 16dc3319b5 openconnect: Bump openconnect to 7.08
Bump openconnect to 7.08. Remove patch as it is included in the
upstream source.

Signed-off-by: Qian Sheng billsq@billsq.me
2017-04-27 01:16:05 -07:00
Alberto Bursi 493ea1afb4 openconnect: added missing libs for openssl
added missing libraries to fix issue https://github.com/openwrt/packages/issues/3301

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
2016-10-22 14:05:16 +02:00
Nikos Mavrogiannopoulos 5731b8e09b openconnect: updated license
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2016-06-16 22:36:31 +02:00
Nikos Mavrogiannopoulos 4083de9d74 openconnect: use proto_add_host_dependency
This ensures that a direct route to the connected host is added
by netifd.

Resolves #2548
2016-05-22 17:42:34 +02:00
Jo-Philipp Wich 06d9094348 openconnect: avoid possible implicit dependency on liblz4
If the liblz4 library exists within the build environment, the openconnect
configure will pick it up and start depending on it, leading to the following
build error:

    Package openconnect is missing dependencies for the following libraries:
    liblz4.so.1

Disable LZ4 support in configure in order to avoid this implicit,
nondeterministic dependency.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-05-19 11:41:44 +02:00
Nikos Mavrogiannopoulos 8661ebeefa openconnect: disabled the resolving code from ppp in netifd script
That code was causing netifd disabling openconnect with no way
to restart it.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2015-08-26 22:59:31 +02:00