73 Commits
Author SHA1 Message Date
Sander van Deijck a91c801b1f openvpn: update to 2.7.9
Update the OpenVPN package to 2.7.9

For changes, see:
https://github.com/OpenVPN/openvpn/blob/v2.7.9/Changes.md

Signed-off-by: Sander van Deijck <sander@vandeijck.com>
2026-11-17 09:08:44 +02:00
Josef Schlehofer 753ec67eef openvpn: add missing CONFLICTS between variants
openvpn-openssl, openvpn-mbedtls and openvpn-wolfssl install the same
files, for example /usr/sbin/openvpn and /etc/openvpn.user. All three
provide openvpn, so apk never installs two of them. In Kconfig only
the implicit conflicts of the default variant openvpn-mbedtls keep the
variants apart, so openvpn-openssl and openvpn-wolfssl can both be
selected and apk then refuses them in the image build.

Let openvpn-mbedtls conflict with the other two and openvpn-openssl
with openvpn-wolfssl.

Checked with defconfig: of each pair one variant drops to m, and
luci-proto-openvpn still selects openvpn-mbedtls.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2026-11-02 15:16:11 +01:00
Qingfang Deng 857e7cfb88 openvpn: enable wolfSSL variant
Build compatibility is fixed on wolfSSL 5.9.4 so remove the BROKEN flag.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2026-10-28 19:29:51 +02:00
Qingfang Deng a110ceeebe openvpn: update to 2.7.8
Update OpenVPN to the latest version.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2026-10-28 19:29:51 +02:00
Erik Conijn 863db0e14c openvpn: make host route depend only on nohostroute
The host dependency for the server endpoint was guarded by
route_net_gateway (IPv4) and net_gateway_ipv6 (IPv6). Neither is a
reliable signal:

- OpenVPN only exports route_net_gateway when it builds a route list,
  i.e. when route, redirect-gateway/redirect-private or pushed routes
  are present. A client using route-nopull, or one that filters out
  the pushed redirect-gateway, gets no host route at all. When another
  VPN then holds the default route, the server endpoint is routed
  through that VPN and the tunnel breaks.

- OpenVPN looks up net_gateway_ipv6 for the default destination
  without a source address, which fails when source routing is enabled
  on wan6 (the default), so the IPv6 host route was rarely added.

netifd resolves the gateway for a host dependency itself, so the guards
are not needed. Add the host dependency whenever trusted_ip or
trusted_ip6 is set, unless nohostroute is set, as WireGuard does.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Erik Conijn <egc112@msn.com>
2026-10-23 17:54:17 +03:00
Qingfang Deng 6edb4a44c7 openvpn: update to 2.7.7
Update to the latest version.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2026-09-16 14:36:17 +03:00
Sander van Deijck 4ab4d123e0 openvpn: update to 2.7.6
Update to the latest version.

For changes, see:
https://github.com/OpenVPN/openvpn/blob/v2.7.6/Changes.rst

Signed-off-by: Sander van Deijck <sander@vandeijck.com>
2026-08-11 09:18:30 +03:00
Erik Conijn 914e0a9b24 openvpn: update to 2.7.5
Maintainer: Alexandru Ardelean ardeleanalex@gmail.com @commodo

Changelog: https://github.com/OpenVPN/openvpn/blob/v2.7.5/Changes.rst

Version: Main
Compile tested: X86 , the sole patch applies cleanly
Run tested: X86

Signed-off-by: Erik Conijn <egc112@msn.com>
2026-07-06 19:32:58 +03:00
Qingfang Deng 5823a0fb6c openvpn: use mbedtls by default
When luci-proto-openvpn is selected in `make menuconfig`,
openvpn-openssl is picked up automatically. As mbedTLS is the default
TLS package, set DEFAULT_VARIANT on openvpn-mbedtls so that it is used
by default.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2026-05-19 10:04:17 +03:00
Andy Chiang c53d53ff93 openvpn: add kmod-ovpn-backports dependency
With openwrt/openwrt@f7d6e73 and openwrt/packages@974c2be, kmod-ovpn-backports can now be built and run correctly.
add this dependency enables DCO.

Link: openwrt/packages@01fafd69e

Test on: Mediatek Filogic GL-MT3000 (with kmod-crypto-hw-safexcel)

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2026-05-16 11:04:52 +03:00
Yanase Yuki b0d8a3d384 treewide: cleanup URLs
This commit converts plain HTTP URLs to HTTPS, and updates
old or outdated URLs.

Signed-off-by: Yanase Yuki <dev@zpc.st>
2026-05-08 22:28:27 +02:00
Sander van Deijck 0393b2260c openvpn: disable wolfssl support
WolfSSL support for OpenVPN is currently broken:
https://github.com/wolfSSL/wolfssl/pull/10309

Until a fix is available, disable WolfSSL as variant.
Support can be re-enabled when WolfSSL is updated.

Signed-off-by: Sander van Deijck <sander@vandeijck.com>
2026-05-05 09:02:59 +03:00
Sander van Deijck 3e779d0564 openvpn: update to 2.7.4
Update the OpenVPN package to 2.7.4

For changes, see:
https://github.com/OpenVPN/openvpn/blob/v2.7.4/Changes.rst

Signed-off-by: Sander van Deijck <sander@vandeijck.com>
2026-05-05 09:02:59 +03:00
Chen Minqiang bb02e8b734 openvpn: handler: refine netifd routing and config
Introduce a new `ipv6` proto option for OpenVPN netifd integration and
export it to the hotplug environment. IPv6 remains enabled by default,
but can now be explicitly disabled per instance.

Update the hotplug helper to apply IPv6 addresses and routes only when
IPv6 is enabled, allowing cleaner IPv4-only tunnel deployments.

Also improve route handling by:
- ignoring invalid default gateway values (0.0.0.0 / ::)
- replacing fixed `seq` loops with shell-safe while loops
- keeping trusted peer host routes conditional on valid gateways

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2026-04-17 08:48:33 +02:00
Alexandru Ardelean 8d3c004213 treewide: set me where PKG_MAINTAINER empty
Seems a lot of packages are just getting abandoned by people.
Will pick these up and see them through.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-04-16 21:48:36 +03:00
Florian Eckert 2255c65fa1 openvpn: make the packages dependency clearer
No functional changes, so the PKG_RELEASE version number has not been
incremented.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-04-15 11:08:30 +02:00
Qingfang Deng 9faf26770b openvpn: update to 2.7.1
The new DCO module depends on OpenVPN 2.7.1.
For details refer to https://github.com/OpenVPN/openvpn/blob/v2.7.1/Changes.rst

Removed upstreamed wolfSSL patches:
- 101-Fix-EVP_PKEY_CTX_-compilation-with-wolfSSL.patch
- 102-Disable-external-ec-key-support-when-building-with-wolfSSL.patch

Reworked 100-mbedtls-disable-runtime-version-check.patch to use
MBEDTLS_VERSION_STRING instead of a mutable buffer.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2026-04-13 19:24:25 +03:00
Chen Minqiang bd524c0a7a openvpn: fix quoting and deprecated option filtering
This patch fixes two issues in the netifd protocol script:

1. Fix logic error in deprecated option filtering:
   Previously, ${f%%:*} was called before checking for the deprecated
   flag (:d). This stripped the suffix and made the check [ "${f#*:}" = "d" ]
   always fail. The cleaning of $f is now deferred until after this check.

2. Improve parameter quoting for specific options:
   - Adds single quotes to --push and --push-remove parameters to handle
     spaces (e.g., "route 10.0.0.0 255.255.255.0").
   - Unifies quoting for 'file' type options to improve shell safety.
   - Refactors the build logic using a case statement for better
     extensibility.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2026-03-27 14:56:22 +01:00
Chen Minqiang cde9e3b668 openvpn: increment PKG_RELEASE by one
Increment PKG_RELEASE by one.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2026-03-21 15:47:47 +02:00
Sander van Deijck e0ab7d0dfa openvpn: update to 2.6.19
Update the openvpn package to the latest version in
the 2.6.x branch while development of the 2.7.x branch
become stable enough to merge.

Signed-off-by: Sander van Deijck <sander@vandeijck.com>
2026-03-18 12:14:11 +02:00
Hannu Nyman eb85b30011 openvpn: increment PKG_RELEASE by one
Increment PKG_RELEASE by one.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2026-03-15 09:28:52 +02:00
Florian Eckert 19bf94887b openvpn: increment PKG_RELEASE by one
Increment PKG_RELEASE by one.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-03-11 14:22:41 +01:00
Florian Eckert 647b67e18b openvpn: add hotplug handling back in
This commit adds hotplug handling back in.

Fixes: 2607b761 ("openvpn: introduce proto handler")

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-03-11 14:22:41 +01:00
Florian Eckert 803e8ae3f7 openvpn: increment PKG_RELEASE by one
Increment PKG_RELEASE by one.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-03-05 07:54:01 +01:00
Florian Eckert 8816657223 openvpn: move usr/share/openvpn files into its own dir
By moving the file to a subdirectory, it is easier to track where the file
is located on the target without having to check the Makefile every time.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-03-05 07:54:01 +01:00
Florian Eckert 310c097378 openvpn: move lib/upgrade/keep.d file into its own dir
By moving the file to a subdirectory, it is easier to track where the file
is located on the target without having to check the Makefile every time.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-03-05 07:54:01 +01:00
Florian Eckert f1c2f51fc8 openvpn: improve readability for files install target
Each script to be installed is moved to its own line to improve readability.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-03-05 07:54:01 +01:00
Florian Eckert 9d2de51e06 openvpn: remove not needed INSTALL_DIR creations
This 'INSTALL_DIR' creation are not needed anymore after refactoring.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-03-05 07:54:01 +01:00
Florian Eckert 27df3c8341 openvpn: refactoring INSTALL_DIR command call during install
Move the 'INSTALL_DIR' creation in the make install target to the location
where the files are also installed. This prevents directories that are no
longer needed from being forgotten during refactoring.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2026-03-05 07:54:01 +01:00
Paul Donald e026ce0f01 openvpn: handle ovpnproto exclusively
Since proto was migrated to ovpnproto to avoid collision
with netifd proto, this shall be handled separately.

Also avoid using uci commands to migrate the config which
requires knowing property types; use awk instead.

follow-up to 2607b76154

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-03 17:23:53 +02:00
Paul Donald 2607b76154 openvpn: introduce proto handler
openvpn needs a proto handler. Here it is.

Removed all of the up/down scripts from the init handler
and made those entirely optional (with some ucode examples).

The config options have been updated to reflect v 2.6/2.7,
with a 'd' flag to denote deprecated. Deprecated flags are
gated behind an 'allow_deprecated' config flag, which must
be on to use them. Some flags will cease to work in the next
version.

Users should not be using compression. Openvpn has enough
security holes and pitfalls already without using
compression.

Updated the example configs (left in place as legacy
documentation) and removed older cryptos which do not exist
in ovpn any longer.

A migration script is included -x. /etc/config/openvpn
entries become interface entries in /etc/config/network
with proto='openvpn'. The source config is retained.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
https://github.com/openwrt/packages/pull/28533
2026-02-22 11:54:13 +02:00
Martin Schiller 390cdc1419 openvpn: add missing options
Add missing options taken from the OpenVPN 2.6 manual.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2025-12-23 10:47:44 -03:00
Ben Kibbey 10ac81b9aa openvpn: add peer-fingerprint support
This lets the --peer-fingerprint openvpn option be parsed which requires
a client TLS certificate fingerprint (colon separated SHA256 hash) to
match one specified in the option argument, during authentication.

Signed-off-by: Ben Kibbey <bjk@luxsci.net>
2025-10-02 18:24:09 -03:00
Wesley Gimenes 7c88f998e5 openvpn: bump PKG_RELEASE
Although recent updates were made, the `PKG_RELEASE` bump was missed.

Signed-off-by: Wesley Gimenes <wehagy@proton.me>
2025-09-29 04:44:04 -03:00
Dennis Camera 01fafd69ef openvpn: remove kmod-ovpn-dco-v2 dependency
OpenVPN does work without the kernel module, it just won't be able to use DCO.
To make life easier for OpenVPN users on very space-constrained devices make it
an optional dependency.

Signed-off-by: Dennis Camera <dennis.camera+openwrt@riiengineering.ch>
2025-06-18 15:31:14 +02:00
Ivan Pavlov 74a66189f1 openvpn: update to 2.6.14
Security fixes:

​CVE-2025-2704: fix possible ASSERT() on OpenVPN servers using --tls-crypt-v2
 Security scope: OpenVPN servers between 2.6.1 and 2.6.13 using --tls-crypt-v2 can be made
 to abort with an ASSERT() message by sending a particular combination of authenticated and
 malformed packets. No crypto integrity is violated, no data is leaked, and no remote code
 execution is possible. This bug does not affect OpenVPN clients.

For details refer to https://github.com/OpenVPN/openvpn/blob/v2.6.14/Changes.rst

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
2025-04-04 14:41:46 +02:00
Ivan Pavlov def5214e2c openvpn: update to 2.6.13
Feature changes:
 - on non-windows clients (MacOS, Linux, Unix) send "release" string from uname() call as IV_PLAT_VER to server
 - Windows: protect cached username, password and token in client memory
 - Windows: use new API to get dco-win driver version from driver
 - Linux: pass --timeout=0 argument to systemd-ask-password, to avoid default timeout of 90 seconds

Security fixes:
 - improve server-side handling of clients sending usernames or passwords longer than USER_PASS_LEN

Notable bug fixes:
 - FreeBSD DCO: fix memory leaks in nvlist handling
 - purge proxy authentication credentials from memory after use

For details refer to https://github.com/OpenVPN/openvpn/blob/v2.6.13/Changes.rst

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
2025-01-16 10:27:34 -08:00
Ivan Pavlov 909825835b openvpn: update to 2.6.12
This is a bugfix release

Bug fixes:

 - the fix for CVE-2024-5594 (refuse control channel messages with nonprintable characters) was too strict, breaking user configurations
   with AUTH_FAIL messages having trailing CR/NL characters. This often happens if the AUTH_FAIL reason is set by a script.

 - Http-proxy: fix bug preventing proxy credentials caching

For details refer to https://github.com/OpenVPN/openvpn/blob/v2.6.12/Changes.rst

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
2024-07-21 05:54:34 -07:00
Clemens Hopfer 1cf592503b openvpn: fix startup with script-security lower than 2
External scripts may only be specified with script-security 2 or higher,
otherwise OpenVPN fails at tunnel startup with an error.
This changes the previously hardcoded hotplug scripts to only be added if
script-security is 2 or higher is used.

Signed-off-by: Clemens Hopfer <openwrt@wireloss.net>
2024-07-03 12:55:24 -07:00
Ivan Pavlov 04d25b2bc1 openvpn: update to 2.6.11
This is a bugfix release containing several security fixes.

Security fixes
--------------
 - CVE-2024-4877: Windows: harden interactive service pipe.
   Security scope: a malicious process with "some" elevated privileges
   could open the pipe a second time, tricking openvn GUI
   into providing user credentials (tokens),  getting full access
   to the account openvpn-gui.exe runs as.

 - CVE-2024-5594: control channel: refuse control channel messages
   with nonprintable characters in them.
   Security scope: a malicious openvpn peer can send garbage to openvpn log,
   or cause high CPU load.

 - CVE-2024-28882: only call schedule_exit() once (on a given peer).
   Security scope: an authenticated client can make the server "keep the session"
   even when the server has been told to disconnect this client

Bug fixes
---------
 - fix connect timeout when using SOCKS proxies

 - work around LibreSSL crashing on OpenBSD 7.5 when enumerating ciphers

 - Add bracket in fingerprint message and do not warn about missing verification

For details refer to https://github.com/OpenVPN/openvpn/blob/v2.6.11/Changes.rst

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
2024-06-21 15:28:10 -07:00
Ivan Pavlov 35ef370178 openvpn: update to 2.6.10
This is a bugfix release containing several security fixes specific to the Windows platform.

Bug fixes
---------
- Windows: if the win-dco driver is used (default) and the GUI requests
  use of a proxy server, the connection would fail.  Disable DCO in
  this case.

- Compression: minor bugfix in checking option consistency vs. compiled-in
  algorithm support

- systemd unit files: remove obsolete syslog.target

Security fixes
--------------
- CVE-2024-27459: Windows: fix a possible stack overflow in the
  interactive service component which might lead to a local privilege
  escalation.

- CVE-2024-24974: Windows: disallow access to the interactive service
  pipe from remote computers.

- CVE-2024-27903: Windows: disallow loading of plugins from untrusted
  installation paths, which could be used to attack openvpn.exe via
  a malicious plugin.

For details refer to https://github.com/OpenVPN/openvpn/blob/v2.6.10/Changes.rst

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
2024-03-23 14:00:08 +01:00
Ivan Pavlov 3e34186c16 openvpn: update to 2.6.9
- license change is now complete, and all code has been re-licensed
  under the new license (still GPLv2, but with new linking exception
  for Apache2 licensed code).
  Code that could not be re-licensed has been removed or rewritten.

- add support for building with mbedTLS 3.x.x

- new option "--force-tls-key-material-export" to only accept clients
  that can do TLS keying material export to generate session keys
  (mostly an internal option to better deal with TLS 1.0 PRF failures).

- Windows: bump vcpkg-ports/pkcs11-helper to 1.30

- Log incoming SSL alerts in easier to understand form and move logging
  from "--verb 8" to "--verb 3".

- protocol_dump(): add support for printing "--tls-crypt" packets

and other fixes

For details refer to https://github.com/OpenVPN/openvpn/blob/v2.6.9/Changes.rst

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
2024-02-22 16:04:42 -08:00
Dirk Brenken fe736b2f8c openvpn: fix start_path_instance function
Check the conffile existance (with .conf extension), before calling the
function 'start_path_instance'. This fixes errors with non-existing and
wrong spelling instances.

Signed-off-by: Dirk Brenken <dev@brenken.org>
- Update commit description
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-02-20 21:35:16 +01:00
Martin Schiller e6fb43bdc9 openvpn: add OpenVPN option disable-dco
You maybe want to disable the DCO support, so let's add this option.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2024-02-07 13:58:46 -08:00
Erik Conijn 61eb0a3d96 openvpn: add missing script-security
Maintainer: @mkrkn  @neheb

Compile tested: armv7, cortexA15, OpenWRT 23.05
Run tested: Linksys EA8500

Compile tested: armv8, cortexA53, OpenWRT main
Run tested: Dynalink DL-WRX36

Description:
Script-security is always 2 and cannot be changed from the openvpn config file due to a missing rule in openvpn.init.

This is discussed in issue #23014

This patch adds the missing rule in openvpn.init to parse script-security from the openvpn config file.

Signed-off-by: Erik Conijn <egc112@msn.com>
2024-01-29 16:06:13 -08:00
Magnus Kroken 214df76f39 openvpn: remove myself as maintainer
Signed-off-by: Magnus Kroken <mkroken@gmail.com>
2024-01-21 22:16:19 +01:00
Erik Conijn 7735cdfe60 Openvpn: add missing script event options
Maintainer: @mkrkn  @neheb
Compile tested: aarch64, cortex-a53, OpenWRT Master
Run tested: Dynalink DL-WRX36

Description:
[A previous commit](https://github.com/openwrt/packages/commit/f8a8b71e26b9bdbf86fbb7d4d1482637af7f3ba4) has added more script event options.
However it looked like that commit was not complete as it stops the use of the script events route-up, route-pre-down, and ipchange when those are placed in the openvpn config file.

This PR fixes a regression that makes it problematic to specify certain event options in the OpenVPN configuration file.

Discussion in [this thread](https://forum.openwrt.org/t/openvpn-custom-route-up-script-in-23-05-rc2/167105/13) and [here](https://forum.openwrt.org/t/openvpn-route-up-and-route-pre-down-broken-in-23-05/176568)

Please have a look and consider implementing or make it possible to use all script event options in the openvpn config file in another way.

Pull request has been discussed and improved with the help of @AuthorReflex, see: https://github.com/openwrt/packages/pull/21732

Signed-off-by: Erik Conijn <egc112@msn.com>
2024-01-02 15:27:52 -08:00
Florian Eckert 72088b34a8 openvpn: bump PKG_RELEASE
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2023-12-20 15:07:37 +01:00
Ivan Pavlov f52f437070 openvpn: update to 2.6.8
This is a bugfix release containing security fixes.

Security Fixes (included in 2.6.7):

CVE-2023-46850 OpenVPN versions between 2.6.0 and 2.6.6 incorrectly use a send buffer
after it has been free()d in some circumstances, causing some free()d memory to be sent to the peer.
All configurations using TLS (e.g. not using --secret) are affected by this issue.

CVE-2023-46849 OpenVPN versions between 2.6.0 and 2.6.6 incorrectly restore --fragment configuration
in some circumstances, leading to a division by zero when --fragment is used.
On platforms where division by zero is fatal, this will cause an OpenVPN crash.

For details refer to https://github.com/OpenVPN/openvpn/blob/v2.6.8/Changes.rst

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
2023-11-19 12:24:11 -08:00
Ivan Pavlov cb8508c41b openvpn: update to 2.6.6
Small bugfix release
For details refer to https://github.com/OpenVPN/openvpn/blob/v2.6.6/Changes.rst

Also, set depends on DCO kernel module when ENABLE_DCO flag is set.

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
2023-08-18 06:17:38 +03:00