Commit Graph

194 Commits

Author SHA1 Message Date
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
Philip Prindeville 9d1c4d20df strongswan: update to 6.0.6
No significant functional changes.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2026-04-26 14:38:41 -06:00
Torbjorn Tyridal a2eec1a568 strongswan: Add support for EAP-TLS authentication
Support for configuring EAP-TLS authentication scheme is added.

Similar to EAP-MSCHAPv2, this one is usually asymmetric
in the way that server auth method (pubkey) is different from
the client auth method (eap-tls).
The code handles this asymmetry automatically.

Signed-off-by: Torbjorn Tyridal <torbjorn@tyridal.no>
2026-01-11 11:34:18 -07:00
Philip Prindeville 6ec4b726f2 strongswan: update to 6.0.4
No significant functional changes.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-12-15 12:34:52 -07:00
Philip Prindeville 784fd7e9d0 strongswan: Update to 6.0.3
No significant functional changes.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-11-10 16:40:36 -10:00
Josef Schlehofer dcb010bb43 strongswan: add build dependency for python and explicitly use python3
Before:
checking for python... /myworkingdir/build/staging_dir/host/bin/python
checking for python version... xcode-select: Failed to locate 'python', requesting installation of command line developer tools.
checking for python platform... xcode-select: Failed to locate 'python', requesting installation of command line developer tools.
checking for GNU default python prefix... ${prefix}
checking for GNU default python exec_prefix... ${exec_prefix}
checking for python script directory (pythondir)... xcode-select: Failed to locate 'python', requesting installation of command line developer tools.
checking for python extension module directory (pyexecdir)... xcode-select: Failed to locate 'python', requesting installation of command line developer tools.

After:
checking for python version... 3.11
checking for python platform... darwin
checking for GNU default python prefix... ${prefix}
checking for GNU default python exec_prefix... ${exec_prefix}
checking for python script directory (pythondir)... ${PYTHON_PREFIX}/lib/python3.11/site-packages
checking for python extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/lib/python3.11/site-packages

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2025-11-01 10:42:13 -06:00
Philip Prindeville 2efa9c7b36 Revert "strongswan: fix build issues around PARSE_ERROR"
@tobiasbrunner is asserting that this patch is no longer
necessary with 6.x.

This reverts commit 89fa8033b8.
2025-07-20 11:48:49 -06:00
Philip Prindeville 89fa8033b8 strongswan: fix build issues around PARSE_ERROR
This symbol is an enum defined both in wolfssl and strongswan.  This
creates a clash in C's flat namespace.  A workaround is to redefine it
when we include wolfssl headers, but really one of the other should
pick a better name.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-07-17 09:41:39 -06:00
Philip Prindeville 8457a9fecc strongswan: Update to 6.0.2
No significant functional changes.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-07-16 10:14:27 -06:00
Philip Prindeville b4cd95e202 strongswan: bump to 6.0.1
mod-bliss and libnttfft are dropped.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-06-08 23:04:52 +03:00
Philip Prindeville cfdcddece4 strongswan: drop mod-uci as part of version bump
This has been broken for a while and hasn't been supported for years.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2025-06-08 23:04:52 +03:00
Kevin Locke 5be8d85937 strongswan: swanctl: Add support for send_certreq
Support the [send_certreq] connection configuration option to disable
offering trusted root CA certificates and reduce the size of the initial
IKE packets.

This work is based on a patch by @aleks-mariusz in
https://forum.openwrt.org/t/confusion-regarding-setting-up-ikev2-vpn-service-with-strongswan-using-ipsec-and-swanctl/169587/9

[send_certreq]: https://docs.strongswan.org/docs/latest/swanctl/swanctlConf.html#_connections

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2025-05-18 11:35:35 -06:00
Robert Marko a8c89a0c77 strongswan: mark UCI plugin as broken
UCI plugin in strongswan has been broken for years, and now its causing
strongswan to fail compilation.

So, instead of the whole strongswan package to be failing and missing from
feeds simply make UCI plug depend on @BROKEN.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-05-18 16:13:24 +02:00
Joel Low 03088536db strongswan: preserve changed configuration files
After reinstalling the packages with the preserved configuration files
after a sysupgrade, the reinstalled package config files overwrite what
is on disk rather than being placed as conf-opkg. Defining these config
files will preserve them appropriately.

Signed-off-by: Joel Low <joel@joelsplace.sg>
2025-05-11 21:18:37 +03:00
Kevin Locke e7aa0272db strongswan: swanctl: make overtime local
$overtime has been used since swanctl.init was added in f9d91f1f47.
However, there's no need for it to be global.  Make it local like the
other config variables to avoid polluting the global namespace and make
the code easier to reason about.

Fixes: f9d91f1f47 ("strongswan: migrate to swanctl configs")
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2025-04-27 13:40:39 -06:00
Kevin Locke 62032567d3 strongswan: swanctl: make send_cert local
When support for send_cert was added in 4b9453b9a4, the $send_cert
variable was inadvertently global.  Make it local to avoid polluting the
global namespace and make the code easier to reason about.

Fixes: 4b9453b9a4 ("strongswan: Add support for send_cert option")
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2025-04-27 13:40:39 -06:00
Kevin Locke c1cfb36e50 strongswan: swanctl: Add support for encap
Support the [encap] connection configuration option to force UDP
encapsulation of ESP packets to work around connectivity issues with
middleboxes which block ESP packets.

This work is based on a patch by @aleks-mariusz in
https://forum.openwrt.org/t/confusion-regarding-setting-up-ikev2-vpn-service-with-strongswan-using-ipsec-and-swanctl/169587/9

[encap]: https://docs.strongswan.org/docs/latest/swanctl/swanctlConf.html#_connections

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2025-04-27 13:35:50 -06:00
Joel Low eb91f914b9 strongswan: DHCP on lo fixes backport
Fixes #25801. Adds the following commits to fix DHCP behaviour on
Strongswan 5.9.14:

 - https://github.com/strongswan/strongswan/commit/abbf9d28b0032cf80b79bcacea3146a60800a6dd
 - https://github.com/strongswan/strongswan/commit/00d8c36d6fdf9e8ee99b9f92a64e7e81dbfa4432
 - https://github.com/strongswan/strongswan/commit/a50ed3006e8152eb2cf20e9f92f088ecc18081b0

Signed-off-by: Joel Low <joel@joelsplace.sg>
2025-04-06 20:06:55 -06:00
Matt Eaton 1cc7069c64 strongswan: fix compilation against wolfssl
Backports upstream patch fix compilation error against recent versions of wolfssl.

Closes https://github.com/openwrt/packages/issues/25877

Signed-off-by: Matt Eaton <git@divinehawk.com>
2025-02-03 16:36:25 +01:00
Martin Pecka 88d1876f38 strongswan: Add support for EAP-MSCHAPv2 authentication
Support for EAP-MSCHAPv2 authentication scheme is added.

Different from the previously supported schemes, this one is
usually asymmetric in the way that server auth method (pubkey) is
different from the client auth method (eap-mschapv2).
The code handles this asymmetry automatically.

A new UCI config section mschapv2_secrets is added where the user
can specify the EAP identities and their passwords that are
accepted by the server. AFAIK, there is no way to select which
EAP IDs should be accepted by which remote, except setting
`eap_id` to something different than `%any`. But `eap_id`
does not support template matching, so either only a single
identity or all can be configured for one remote. This is why
the EAP identities are not subsections of remotes, but are
a standalone section.

Signed-off-by: Martin Pecka <peci1@seznam.cz>
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
2024-11-19 08:05:33 -08:00
Martin Pecka 6b824ee7d7 strongswan: Fix pools to be only generated once
Before this commit, if a user configures multiple remotes in UCI,
each remote generates one output section of pools.
This doesn't hurt because swanctl just merges all of them,
but it is apparently not needed to have N copies of the same.

This commit changes the behavior to only create one pools
section at the end of the generated swanctl config.

Signed-off-by: Martin Pecka <peci1@seznam.cz>
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
2024-11-19 08:05:33 -08:00
Martin Pecka 4b9453b9a4 strongswan: Add support for send_cert option
This option is required by some clients, e.g. iOS.

Signed-off-by: Martin Pecka <peci1@seznam.cz>
2024-11-19 08:05:33 -08:00
Stephen Baker 292f29474b strongswan: comma separated list for {left,right}subnet
Translate local_subnet and remote_subnet in /etc/config/ipsec into a comma separated list for leftsubnet and rightsubnet in /var/ipsec/ipsec.conf
2024-07-28 15:56:17 -06:00
Philip Prindeville d95f6625e3 strongswan: Add missing declarations in swanctl
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2024-05-06 20:51:12 -06:00
Philip Prindeville b014ae3f86 strongswan: Backport upstream fix for RNG definition conflict
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2024-04-03 21:34:36 -06:00
Philip Prindeville 509d1ecca7 strongswan: drop unneeded sleep patch
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2024-03-27 20:17:40 -06:00
Philip Prindeville b20950a515 strongswan: backport upstream MUSL fix for farp_spoofer.c
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2024-03-27 20:17:40 -06:00
Philip Prindeville 04c1d688de strongswan: backport upstream MUSL fix for pf_handler.c
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2024-03-27 20:17:40 -06:00
Philip Prindeville 544abeb36a strongswan: simplify MUSL patch
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2024-03-27 20:17:40 -06:00
Philip Prindeville a90d387e86 strongswan: Update to 5.9.14
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2024-03-27 20:17:40 -06:00
Glen Huang ce76cad36e strongswan: add empty config
Without it, using uci to manipulate ipsec config can result in errors,
making it much difficult to use in uci-defaults for example.

Signed-off-by: Glen Huang <me@glenhuang.com>
2024-02-20 13:52:28 +08:00
Joel Low f2d209e4ff strongswan: trigger reload when interfaces are specified
Fixes #20848

Add interface triggers if interfaces to listen to are specified in
`/etc/config/ipsec`. This fixes the "running with no instances" scenario
after rebooting a router.

Signed-off-by: Joel Low <joel@joelsplace.sg>
2023-12-18 10:17:09 +08:00
Philip Prindeville c094851caf strongswan: Update to 5.9.13
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-12-03 22:33:04 -07:00
Philip Prindeville ed30ca0f38 strongswan: Update to 5.9.12
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-11-26 21:44:52 -07:00
Tiago Gaspar a7c7265e1b strongswan: swanctl: add support for replay window
Add support for replay window configuration in UCI.

Signed-off-by: Tiago Gaspar <tiagogaspar8@gmail.com>
2023-11-17 09:25:36 +00:00
Tarvi Pillessaar 64f370cabe strongswan: add eap-dynamic plugin
This plugin acts as a proxy that dynamically selects an EAP method that is
supported/preferred by the client. If the original EAP method initiated by
the plugin is rejected with an EAP-NAK message, it will select a different
method that is supported/requested by the client.

For example it is possible to configure eap-tls as preferred
authentication method for your connection while still allow eap-mschapv2.

Signed-off-by: Tarvi Pillessaar <tarvip@gmail.com>
2023-10-23 09:45:46 +03:00
Philip Prindeville 08158d2718 strongswan: Update to 5.9.11
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-06-30 19:50:31 +02:00
Philip Prindeville 7f8aea6d86 strongswan: make parsing more consistent
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-06-15 18:33:08 -06:00
Glen Huang 0436897323 strongswan: add missing PKG_MOD_AVAILABLE
Without these charon will warn with messages like:

plugin 'kdf': failed to load - kdf_plugin_create not found and no plugin file available
plugin 'drbg': failed to load - drbg_plugin_create not found and no plugin file available

Signed-off-by: Glen Huang <me@glenhuang.com>
2023-04-24 22:40:18 +08:00
Philip Prindeville 6a3e5464ca Merge pull request #20832 from hgl/strongswan
strongswan: enable nonce unconditionally
2023-04-24 08:34:55 -06:00
Glen Huang e67eb58312 strongswan: enable nonce unconditionally
Without nonce, charon won't start, so it's not an optional plugin. I
asked one of the strongSwan maintainers (ecdsa), and he confirmed this:

> It definitely has to be enabled unconditionally. The only other
> provider for the NONCE_GEN plugin feature is in charon-tkm, so
> completely irrelevant on OpenWrt

Signed-off-by: Glen Huang <me@glenhuang.com>
2023-04-24 15:51:28 +08:00
Philip Prindeville 5f3840c765 strongswan: local_gateway unused in swanctl.init
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-04-22 18:20:38 -06:00
Glen Huang d347448ffb strongswan: add support for remote cacerts
Signed-off-by: Glen Huang <me@glenhuang.com>
2023-04-10 17:16:07 +08:00
Glen Huang 08a0f7bb94 strongswan: add support for pools section
Signed-off-by: Glen Huang <me@glenhuang.com>
2023-04-10 17:16:07 +08:00
Philip Prindeville d1b2bb9dcd strongswan: Fix CI/CD complaints about kmod dependencies
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-03-28 13:33:08 -06:00
Philip Prindeville 216b6b61a8 strongswan: simplify indentation
Allow passing multiple config lines with the same indent level.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-03-26 13:53:59 -06:00
Philip Prindeville 03eab9b63b strongswan: Fix indent for hw_offload, interface, priority
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-03-26 13:53:05 -06:00
Philip Prindeville 7cf43fabe2 strongswan: Update to 5.9.10
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-03-12 18:32:43 -06:00
Philip Prindeville ae0a8072d6 strongswan: Update to 5.9.9
Add patch to remove definition of RNG leaking in from wolfssl.h.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2023-03-12 13:54:32 -06:00
Stijn Tintel e6060502e7 strongswan: fix typo in strongswan-mod-nonce description
Fixes: #16691
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-12-28 03:18:19 +02:00