]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
8 weeks agofetcher: Remove unused FETCH_HTTP_VERSION_1_0 option
Tobias Brunner [Tue, 3 Jun 2025 15:37:24 +0000 (17:37 +0200)] 
fetcher: Remove unused FETCH_HTTP_VERSION_1_0 option

Was only used by the removed scepclient and does not serve any purpose
nowadays anyway.

8 weeks agounit-tests: Serial number tests depend on X.509 certificate parsing
Tobias Brunner [Wed, 4 Jun 2025 15:14:08 +0000 (17:14 +0200)] 
unit-tests: Serial number tests depend on X.509 certificate parsing

Requires additional plugin features, but if this is available, the
others are usually as well.

8 weeks agowolfssl: Fix build if wolfSSL was built in OpenSSL-compat mode
Tobias Brunner [Wed, 4 Jun 2025 16:25:22 +0000 (18:25 +0200)] 
wolfssl: Fix build if wolfSSL was built in OpenSSL-compat mode

8 weeks agoMerge branch 'wolfssl-fips'
Tobias Brunner [Mon, 2 Jun 2025 09:31:03 +0000 (11:31 +0200)] 
Merge branch 'wolfssl-fips'

Fixes various issues when building the wolfssl plugin against wolfSSL's
FIPS module.

References strongswan/strongswan#2603
Closes strongswan/strongswan#2771

8 weeks agowolfssl: Unlock keys if necessary when using FIPS module
Juliusz Sosinowicz [Wed, 23 Apr 2025 14:32:52 +0000 (16:32 +0200)] 
wolfssl: Unlock keys if necessary when using FIPS module

Wrap the functions that require it in PRIVATE_KEY_UNLOCK/PRIVATE_KEY_LOCK.
This can't be done at plugin initialization because it needs to be done
for every thread. strongSwan currently doesn't provide on-thread-create
callbacks for plugins so we need to wrap each direct call. Another reason
to do so is that some functions we call (e.g. wc_EccKeyToDer) internally
call PRIVATE_KEY_UNLOCK/PRIVATE_KEY_LOCK and would leave the keys locked
for that particular thread.

8 weeks agowolfssl: Properly initialize ECC private key object
Juliusz Sosinowicz [Wed, 23 Apr 2025 13:56:09 +0000 (15:56 +0200)] 
wolfssl: Properly initialize ECC private key object

8 weeks agowolfssl: Set a dummy key when testing KDF implementations
Tobias Brunner [Fri, 21 Feb 2025 07:09:31 +0000 (08:09 +0100)] 
wolfssl: Set a dummy key when testing KDF implementations

In FIPS mode, wolfSSL enforces a minimum key size for these algorithms.

8 weeks agotest-vectors: Remove HMAC PRF test vectors with key size 4
Tobias Brunner [Tue, 18 Feb 2025 13:24:08 +0000 (14:24 +0100)] 
test-vectors: Remove HMAC PRF test vectors with key size 4

Some implementations enforce a minimum key size (e.g. wolfSSL in FIPS
mode) and in practice, the keys will be longer anyway (e.g. our nonces
are 32 bytes).

8 weeks agowolfssl: Include settings.h in case WOLFSSL_USER_SETTINGS is defined
Tobias Brunner [Fri, 29 Nov 2024 07:45:53 +0000 (08:45 +0100)] 
wolfssl: Include settings.h in case WOLFSSL_USER_SETTINGS is defined

8 weeks agowolfssl: Use consistent defines for ECC public/private key loading
Tobias Brunner [Thu, 28 Nov 2024 08:28:28 +0000 (09:28 +0100)] 
wolfssl: Use consistent defines for ECC public/private key loading

HAVE_ECC_KEY_IMPORT can be defined while HAVE_ECC_SIGN is not.
So just use the same defines we use when defining the load functions.

8 weeks agowolfssl: Call wc_SetSeed_Cb() as required for FIPS-mode
Tobias Brunner [Tue, 26 Nov 2024 09:19:33 +0000 (10:19 +0100)] 
wolfssl: Call wc_SetSeed_Cb() as required for FIPS-mode

2 months agoMerge branch 'iptfs'
Tobias Brunner [Wed, 28 May 2025 14:48:42 +0000 (16:48 +0200)] 
Merge branch 'iptfs'

This adds basic support for IP-TFS/AGGFRAG (RFC 9347).  The Linux kernel,
since 6.14, only supports aggregation/fragmentation so far.  The actual
TFS features will get added later.

2 months agotesting: Add ikev2/net2net-iptfs scenario
Tobias Brunner [Fri, 16 May 2025 08:28:16 +0000 (10:28 +0200)] 
testing: Add ikev2/net2net-iptfs scenario

2 months agotesting: Add config for Linux 6.14
Tobias Brunner [Fri, 16 May 2025 08:22:20 +0000 (10:22 +0200)] 
testing: Add config for Linux 6.14

This has IP-TFS enabled.

2 months agoconf: Document global IP-TFS settings
Tobias Brunner [Thu, 15 May 2025 10:58:12 +0000 (12:58 +0200)] 
conf: Document global IP-TFS settings

2 months agochild-create: Negotiate IP-TFS mode if configured
Tobias Brunner [Thu, 15 May 2025 10:57:38 +0000 (12:57 +0200)] 
child-create: Negotiate IP-TFS mode if configured

2 months agonotify-payload: Add notify type for IP-TFS/AGGFRAG
Tobias Brunner [Thu, 15 May 2025 08:37:01 +0000 (10:37 +0200)] 
notify-payload: Add notify type for IP-TFS/AGGFRAG

2 months agokernel-netlink: Support IPTFS mode and attributes
Tobias Brunner [Thu, 15 May 2025 07:22:17 +0000 (09:22 +0200)] 
kernel-netlink: Support IPTFS mode and attributes

2 months agochild-sa: Allow disabling fragmenting packets across AGGFRAG payloads
Tobias Brunner [Thu, 15 May 2025 10:56:00 +0000 (12:56 +0200)] 
child-sa: Allow disabling fragmenting packets across AGGFRAG payloads

This is necessary if the peer isn't able to handle such fragments.

2 months agokernel-ipsec: Add flag to disable sending fragments across AGGFRAG payloads
Tobias Brunner [Thu, 15 May 2025 07:20:52 +0000 (09:20 +0200)] 
kernel-ipsec: Add flag to disable sending fragments across AGGFRAG payloads

We have to set this if the peer indicates that it doesn't support
handling such fragments in the notify.

2 months agovici: Make IP-TFS mode configurable
Tobias Brunner [Wed, 14 May 2025 08:13:44 +0000 (10:13 +0200)] 
vici: Make IP-TFS mode configurable

2 months agoinclude: Add XFRM mode and attributes for IP-TFS
Tobias Brunner [Wed, 14 May 2025 08:16:55 +0000 (10:16 +0200)] 
include: Add XFRM mode and attributes for IP-TFS

2 months agoipsec-types: Add new mode for IP-TFS
Tobias Brunner [Wed, 14 May 2025 08:11:12 +0000 (10:11 +0200)] 
ipsec-types: Add new mode for IP-TFS

Added at the end as the numeric mode is e.g. used in SQL databases.

2 months agoMerge branch 'per-cpu-sas'
Tobias Brunner [Wed, 28 May 2025 14:36:10 +0000 (16:36 +0200)] 
Merge branch 'per-cpu-sas'

This adds support for per-CPU SAs (RFC 9611).

2 months agotesting: Add ikev2/per-cpu-sas-encap-transport scenario
Tobias Brunner [Wed, 16 Jun 2021 07:45:57 +0000 (09:45 +0200)] 
testing: Add ikev2/per-cpu-sas-encap-transport scenario

Tests transport mode and UDP encapsulation with random source ports.
Interestingly, the responder always uses the same SA to respond (maybe
due to the cache on the policy).

2 months agotesting: Add ikev2/per-cpu-sas-encap scenario
Tobias Brunner [Tue, 15 Jun 2021 09:13:35 +0000 (11:13 +0200)] 
testing: Add ikev2/per-cpu-sas-encap scenario

Basically the same as the one without UDP encapsulation, but here the
outbound SAs use random source ports.

2 months agokernel-netlink: Suppress NAT mapping updates for per-CPU SAs
Tobias Brunner [Tue, 22 Apr 2025 09:19:34 +0000 (11:19 +0200)] 
kernel-netlink: Suppress NAT mapping updates for per-CPU SAs

As we set the remote port to 0, we'd get a mapping change message with
every packet. Setting the threshold avoids all kernel messages after the
first, which we suppress explicitly as well.

2 months agochild-sa: Configure UDP encapsulation for per-CPU SAs
Tobias Brunner [Tue, 15 Jun 2021 09:11:14 +0000 (11:11 +0200)] 
child-sa: Configure UDP encapsulation for per-CPU SAs

As the kernel does not support processing UDP-encapsulated and plain ESP
for the same SA, we require forcing UDP encapsulation if there is no NAT.

2 months agovici: Make UDP encapsulation for per-CPU SAs configurable
Tobias Brunner [Tue, 15 Jun 2021 09:10:40 +0000 (11:10 +0200)] 
vici: Make UDP encapsulation for per-CPU SAs configurable

2 months agochild-cfg: Add flag to enable UDP encapsulation for per-CPU SAs
Tobias Brunner [Tue, 15 Jun 2021 07:46:31 +0000 (09:46 +0200)] 
child-cfg: Add flag to enable UDP encapsulation for per-CPU SAs

2 months agotesting: Add per-CPU SA test scenario
Tobias Brunner [Wed, 2 Jun 2021 15:07:01 +0000 (17:07 +0200)] 
testing: Add per-CPU SA test scenario

2 months agotesting: Configure multiple virtual CPUs for moon and sun
Tobias Brunner [Mon, 31 May 2021 14:46:41 +0000 (16:46 +0200)] 
testing: Configure multiple virtual CPUs for moon and sun

This allows testing per-CPU SAs by e.g. pinging over a specific CPU
via taskset.

2 months agotesting: Enable SMP support for latest kernels
Tobias Brunner [Mon, 31 May 2021 15:09:28 +0000 (17:09 +0200)] 
testing: Enable SMP support for latest kernels

2 months agoswanctl: Report per-CPU information in --list-sas
Tobias Brunner [Thu, 20 May 2021 08:32:09 +0000 (10:32 +0200)] 
swanctl: Report per-CPU information in --list-sas

2 months agovici: Report per-CPU SA information
Tobias Brunner [Thu, 20 May 2021 08:19:41 +0000 (10:19 +0200)] 
vici: Report per-CPU SA information

2 months agovici: Make per-CPU CHILD_SAs configurable
Tobias Brunner [Thu, 20 May 2021 08:12:30 +0000 (10:12 +0200)] 
vici: Make per-CPU CHILD_SAs configurable

2 months agokernel-netlink: Forward CPU ID from acquires
Tobias Brunner [Thu, 20 May 2021 08:04:46 +0000 (10:04 +0200)] 
kernel-netlink: Forward CPU ID from acquires

2 months agotrap-manager: Add support to handle acquires for per-CPU SAs
Tobias Brunner [Thu, 20 May 2021 07:46:55 +0000 (09:46 +0200)] 
trap-manager: Add support to handle acquires for per-CPU SAs

2 months agokernel-handler: Log CPU ID that's passed with an acquire
Tobias Brunner [Mon, 26 Sep 2022 14:55:00 +0000 (16:55 +0200)] 
kernel-handler: Log CPU ID that's passed with an acquire

2 months agokernel-interface: Optionally pass CPU ID for which an acquire was triggered
Tobias Brunner [Mon, 26 Sep 2022 14:47:46 +0000 (16:47 +0200)] 
kernel-interface: Optionally pass CPU ID for which an acquire was triggered

2 months agoike-sa: Accept optional CPU ID when initiating CHILD_SAs
Tobias Brunner [Wed, 19 May 2021 13:11:53 +0000 (15:11 +0200)] 
ike-sa: Accept optional CPU ID when initiating CHILD_SAs

2 months agoike-sa: Sort CHILD_SAs by CPU ID
Tobias Brunner [Thu, 20 May 2021 07:41:54 +0000 (09:41 +0200)] 
ike-sa: Sort CHILD_SAs by CPU ID

This might make debugging easier and also ensures that a possible
fallback SA without CPU ID is established first when reestablishing
an IKE_SA.  Because even if such an SA is established first initially,
that might change later depending on when per-CPU SAs are rekeyed.

2 months agochild-rekey: Maintain per-CPU values during rekeying
Tobias Brunner [Wed, 19 May 2021 10:00:39 +0000 (12:00 +0200)] 
child-rekey: Maintain per-CPU values during rekeying

2 months agochild-create: Add support to negotiate per-CPU SAs
Tobias Brunner [Wed, 19 May 2021 08:59:03 +0000 (10:59 +0200)] 
child-create: Add support to negotiate per-CPU SAs

2 months agoupdown: Don't call the script for per-CPU SAs
Tobias Brunner [Mon, 31 May 2021 14:12:27 +0000 (16:12 +0200)] 
updown: Don't call the script for per-CPU SAs

Rules are installed for the fallback SA that has no CPU ID assigned.

2 months agoha: Ignore per-CPU CHILD_SAs
Tobias Brunner [Mon, 31 May 2021 13:26:27 +0000 (15:26 +0200)] 
ha: Ignore per-CPU CHILD_SAs

These only work on initiators (with trap policies), which is something
the plugin doesn't support.

2 months agoforecast: Ignore per-CPU CHILD_SAs
Tobias Brunner [Mon, 31 May 2021 13:21:46 +0000 (15:21 +0200)] 
forecast: Ignore per-CPU CHILD_SAs

Not sure if this combination does make sense as the plugin itself would
be a major bottleneck.

Similar to the connmark plugin, PREROUTING rules list SPIs or UDP ports,
which would be necessary for all SAs while the OUTPUT rules would only be
required once.

2 months agoconnmark: Ignore per-CPU CHILD_SAs
Tobias Brunner [Mon, 31 May 2021 13:06:41 +0000 (15:06 +0200)] 
connmark: Ignore per-CPU CHILD_SAs

The combination probably doesn't make much sense.

The OUTPUT rules would definitely only be required once, while the INPUT
and PREROUTING rules list individual SPIs and/or UDP ports, which would
be necessary for all SAs.

By the way, the rules in PREROUTING might actually not be necessary
anymore if the set_mark_in option was used for such SAs.

2 months agochild-sa: Add support for per-CPU SAs
Tobias Brunner [Tue, 11 May 2021 15:55:21 +0000 (17:55 +0200)] 
child-sa: Add support for per-CPU SAs

The CPU ID is also set on inbound SAs as it can be used to configure RSS
or some eBPF program.

2 months agokernel-netlink: Add support to enable per-CPU acquires on policies
Tobias Brunner [Tue, 11 May 2021 14:24:38 +0000 (16:24 +0200)] 
kernel-netlink: Add support to enable per-CPU acquires on policies

2 months agokernel-netlink: Add support to set CPU ID on SA
Tobias Brunner [Tue, 11 May 2021 14:07:39 +0000 (16:07 +0200)] 
kernel-netlink: Add support to set CPU ID on SA

2 months agoipsec-types: Add identifier for the maximum (=no) CPU ID
Tobias Brunner [Mon, 10 May 2021 14:28:15 +0000 (16:28 +0200)] 
ipsec-types: Add identifier for the maximum (=no) CPU ID

2 months agoinclude: Add XFRM identifiers for per-CPU SAs/acquires
Tobias Brunner [Mon, 10 May 2021 14:23:20 +0000 (16:23 +0200)] 
include: Add XFRM identifiers for per-CPU SAs/acquires

2 months agochild-cfg: Add flag to enable per-CPU SAs
Tobias Brunner [Tue, 11 May 2021 12:46:29 +0000 (14:46 +0200)] 
child-cfg: Add flag to enable per-CPU SAs

2 months agonotify-payload: Add notify types for per-resource CHILD_SAs
Tobias Brunner [Tue, 11 May 2021 12:21:25 +0000 (14:21 +0200)] 
notify-payload: Add notify types for per-resource CHILD_SAs

2 months agotesting: Include the kernel build number
Tobias Brunner [Thu, 17 Apr 2025 08:03:56 +0000 (10:03 +0200)] 
testing: Include the kernel build number

2 months agoMerge branch 'acquires-seq'
Tobias Brunner [Wed, 28 May 2025 14:30:56 +0000 (16:30 +0200)] 
Merge branch 'acquires-seq'

This uses the sequence number from acquires when installing the SA. This
allows handling narrowing properly by changing the reqid and still
removing the temporary state in the kernel.  It also changes that
traffic selectors are reused during rekeying/recreation/reauthentication,
so narrowed selectors won't return to the wider configured TS because
there won't be any TS from triggering packets to narrow again.

2 months agotesting: Add ikev2/net2net-route-narrow scenario
Tobias Brunner [Mon, 24 Mar 2025 13:02:25 +0000 (14:02 +0100)] 
testing: Add ikev2/net2net-route-narrow scenario

2 months agochild-create: Consider previous TS when checking for duplicates
Tobias Brunner [Wed, 2 Apr 2025 12:49:58 +0000 (14:49 +0200)] 
child-create: Consider previous TS when checking for duplicates

2 months agochild-sa: Add helper to check if a list of TS match negotiated TS
Tobias Brunner [Wed, 2 Apr 2025 12:39:38 +0000 (14:39 +0200)] 
child-sa: Add helper to check if a list of TS match negotiated TS

2 months agochild-create: Maintain traffic selectors during rekeying/reauthentication
Tobias Brunner [Tue, 1 Apr 2025 15:33:35 +0000 (17:33 +0200)] 
child-create: Maintain traffic selectors during rekeying/reauthentication

If we don't do this, narrowed SAs would default to the wide configured
traffic selectors and the peer won't know if/how to narrow.

2 months agochild-create: Use more generic method to pass information from previous SA
Tobias Brunner [Tue, 1 Apr 2025 15:28:28 +0000 (17:28 +0200)] 
child-create: Use more generic method to pass information from previous SA

Besides the previous key exchange method, this will allow us to also
reuse the previous traffic selectors.  Some data is still passed in
separate methods as some are set even when there is no previous SA and
others are not set in all cases.

The interface for queue_child() now optionally takes the previous
Child SA to handle both recreations and initiations from scratch.

2 months agochild-cfg: Use traffic selector list
Tobias Brunner [Tue, 1 Apr 2025 08:02:31 +0000 (10:02 +0200)] 
child-cfg: Use traffic selector list

2 months agotraffic-selector-list: Add helper class to manage a collection of TS
Tobias Brunner [Tue, 25 Mar 2025 11:43:26 +0000 (12:43 +0100)] 
traffic-selector-list: Add helper class to manage a collection of TS

Provides functions to optionally resolve dynamic TS and to narrow
them based on a list of supplied TS.

2 months agotrap-manager: Set seq. no. for CHILD_SAs not initiated by an acquire
Tobias Brunner [Mon, 24 Mar 2025 17:03:42 +0000 (18:03 +0100)] 
trap-manager: Set seq. no. for CHILD_SAs not initiated by an acquire

This fixes cases where `start_action = trap|start` is used and an acquire
is triggered while the SA is initiated (granted if narrowing is expected,
that's not a recommended configuration as the responder can only use
the first config when there is no packet TS).  The resulting second
create-child task will potentially get dropped by the duplicate check,
so the temporary state won't get removed and traffic is blocked until
that expires, neither can acquires get triggered for traffic that doesn't
match the initial SA's policies.

2 months agochild-create: Trigger CHILD_INSTALLING event after setting traffic selectors
Tobias Brunner [Mon, 24 Mar 2025 16:56:46 +0000 (17:56 +0100)] 
child-create: Trigger CHILD_INSTALLING event after setting traffic selectors

This was the case before bce0c5fd74a0 ("child-create: Update CHILD_SA IP
addresses before installation") and allows listeners to consider the
traffic selectors of the SA that's about to get installed.

2 months agochild-create: Use helper to compare packet TS against CHILD_SAs
Tobias Brunner [Mon, 24 Mar 2025 15:48:19 +0000 (16:48 +0100)] 
child-create: Use helper to compare packet TS against CHILD_SAs

2 months agochild-sa: Add helper to check if two TS match negotiated TS
Tobias Brunner [Mon, 24 Mar 2025 15:47:54 +0000 (16:47 +0100)] 
child-sa: Add helper to check if two TS match negotiated TS

2 months agoacquire-job: Use helpers to manage acquire data
Tobias Brunner [Mon, 24 Mar 2025 14:53:19 +0000 (15:53 +0100)] 
acquire-job: Use helpers to manage acquire data

2 months agokernel-listener: Add helpers to clone/destroy acquire data
Tobias Brunner [Mon, 24 Mar 2025 14:53:00 +0000 (15:53 +0100)] 
kernel-listener: Add helpers to clone/destroy acquire data

2 months agochild-create: Consider triggering TS when checking for duplicate
Tobias Brunner [Mon, 24 Mar 2025 14:32:57 +0000 (15:32 +0100)] 
child-create: Consider triggering TS when checking for duplicate

2 months agovici: Include reqid when listing trap policies
Tobias Brunner [Fri, 21 Mar 2025 13:51:08 +0000 (14:51 +0100)] 
vici: Include reqid when listing trap policies

2 months agokernel-pfkey: Don't use TS from acquire in tunnel mode
Tobias Brunner [Tue, 8 Apr 2025 07:02:12 +0000 (09:02 +0200)] 
kernel-pfkey: Don't use TS from acquire in tunnel mode

The addresses are actually the endpoints of the SA, not information on
the matched packet (except that the RFC says to set the ports and
protocol of the packet in the source address, which the Linux kernel
doesn't do).  So these are useless, unless transport mode is used, where
the addresses are needed for the wildcard trap policy use case.

The RFC mentions a PROXY address (a single one, not two), that could
apparently be something like the source address in tunnel mode.
However, the description of how this is used in the RFC is quite weird
and neither Linux nor FreeBSD send such an attribute in SADB_ACQUIRE.

2 months agokernel-netlink: Add support for acquire sequence numbers
Tobias Brunner [Wed, 19 Mar 2025 15:27:39 +0000 (16:27 +0100)] 
kernel-netlink: Add support for acquire sequence numbers

Note that while PF_KEYv2 also uses sequence numbers to identify acquires,
which we currently don't use correctly by the way, it does not include
information about the packet that triggered an acquire.  What we receive
in src and dst, and currently forward as traffic selectors, are actually
the designated endpoints of the SA. So especially in tunnel mode this is
useless to do narrowing on the responder (these addresses might not even
match the configured TS).

2 months agokernel-interface: Change reqid if seq. nos. are supported and narrowing occurred
Tobias Brunner [Thu, 20 Mar 2025 13:52:32 +0000 (14:52 +0100)] 
kernel-interface: Change reqid if seq. nos. are supported and narrowing occurred

With the sequence numbers we don't have to maintain the reqid to delete
the temporary state.

One exception is with labels.  There we currently only install trap
policies with the generic label.  SAs created from those don't have
policies installed, so we have to reuse the reqid of the trap even if
narrowing occurs.

And as before, we reuse the reqid without checking traffic selectors if
sequence numbers are not supported.

Note that if a CHILD_SA is manually initiated (i.e. has no sequence
number assigned) right before an acquire is triggered, there are several
possible outcomes depending on whether narrowing occurs.  If there is no
narrowing, the same reqid is assigned and the kernel will remove the
temporary SA when the SA is installed (no seq => reqid match).
Afterwards, the queued duplicate CHILD_SA is destroyed and the acquire
state in the trap manager gets removed.  If there is narrowing, a new
reqid is allocated, so the installation of the SA will not remove the
temporary state.  However, due to the narrowing, the duplicate check
fails and when the duplicate is installed (with sequence number), the
temporary state is deleted (as is the state in the trap manager).

2 months agochild-cfg: Use separate method to get configured traffic selectors
Tobias Brunner [Wed, 19 Mar 2025 14:34:58 +0000 (15:34 +0100)] 
child-cfg: Use separate method to get configured traffic selectors

Optionally with "dynamic" traffic selectors resolved.  A new method
is added for those cases where we actually want to select potentially
narrowed traffic selectors using a supplied list.  The latter now also
always logs details, while the former does not.

2 months agotrap-manager: Use sequence numbers to identify acquires
Tobias Brunner [Wed, 19 Mar 2025 13:20:46 +0000 (14:20 +0100)] 
trap-manager: Use sequence numbers to identify acquires

Either use the sequence number from the kernel (and potentially update
it if the acquire was retriggered), or generate our own sequence
numbers, which simplifies matching acquires to established/destroyed
CHILD_SAs.

2 months agoike: Support optional acquire sequence numbers when creating CHILD_SAs
Tobias Brunner [Wed, 19 Mar 2025 12:28:44 +0000 (13:28 +0100)] 
ike: Support optional acquire sequence numbers when creating CHILD_SAs

2 months agochild-sa: Store and propagate optional acquire sequence number
Tobias Brunner [Wed, 19 Mar 2025 12:28:12 +0000 (13:28 +0100)] 
child-sa: Store and propagate optional acquire sequence number

2 months agokernel-interface: Add members for optional acquire sequence number
Tobias Brunner [Wed, 19 Mar 2025 12:27:20 +0000 (13:27 +0100)] 
kernel-interface: Add members for optional acquire sequence number

2 months agoMerge branch 'regex-ids'
Tobias Brunner [Wed, 28 May 2025 07:58:46 +0000 (09:58 +0200)] 
Merge branch 'regex-ids'

Adds support for POSIX regular expressions in configured identities,
which makes matching remote identities more flexible.

2 months agovici: Add support for POSIX regular expressions in identity fields
Tobias Brunner [Wed, 16 Apr 2025 12:30:30 +0000 (14:30 +0200)] 
vici: Add support for POSIX regular expressions in identity fields

2 months agoconf: Escape " and \ in man page output
Tobias Brunner [Wed, 16 Apr 2025 13:30:35 +0000 (15:30 +0200)] 
conf: Escape " and \ in man page output

2 months agoidentification: Add support for POSIX regular expressions
Tobias Brunner [Tue, 15 Apr 2025 13:09:20 +0000 (15:09 +0200)] 
identification: Add support for POSIX regular expressions

When cross-compiling for Windows on Ubuntu, we don't have POSIX regular
expressions available (there does not seem to be any alternative libraries
either), but since the tests are not executed that's OK.  On AppVeyor,
MSYS2 has libgnurx installed, which works fine but requires explicit
linking with `-lregex`.

This is loosely based on a patch by Thomas Egerer.

2 months agodebug: Use separate log group for watcher_t
Tobias Brunner [Tue, 27 May 2025 09:27:41 +0000 (11:27 +0200)] 
debug: Use separate log group for watcher_t

This component produces a lot of messages that make debugging job
handling difficult.

2 months agogithub: Use AWS-LC 1.52.0 for tests
Tobias Brunner [Mon, 26 May 2025 15:24:15 +0000 (17:24 +0200)] 
github: Use AWS-LC 1.52.0 for tests

2 months agowolfssl: Remove unused drbg_t instance when building without testable KE
Tobias Brunner [Fri, 23 May 2025 09:34:35 +0000 (11:34 +0200)] 
wolfssl: Remove unused drbg_t instance when building without testable KE

2 months agoml: Remove unused drbg_t instance when building without testable KE
Tobias Brunner [Fri, 23 May 2025 09:34:18 +0000 (11:34 +0200)] 
ml: Remove unused drbg_t instance when building without testable KE

2 months agobotan: Remove unused drbg_t instance when building without testable KE
Tobias Brunner [Fri, 23 May 2025 09:33:32 +0000 (11:33 +0200)] 
botan: Remove unused drbg_t instance when building without testable KE

2 months agopki: Reduce indentation in usage output and print command description
Tobias Brunner [Thu, 22 May 2025 13:13:17 +0000 (15:13 +0200)] 
pki: Reduce indentation in usage output and print command description

Also print error message at the end of the output.

2 months agoswanctl: Reduce indentation in usage output and print command descriptions
Tobias Brunner [Thu, 22 May 2025 12:56:24 +0000 (14:56 +0200)] 
swanctl: Reduce indentation in usage output and print command descriptions

Also print error message at the end of the output.

2 months agoswanctl: Document maximum log level of messages received by --log
Tobias Brunner [Thu, 22 May 2025 12:18:49 +0000 (14:18 +0200)] 
swanctl: Document maximum log level of messages received by --log

2 months agovici: Document that the log event only receives messages on level 0 and 1
Tobias Brunner [Thu, 22 May 2025 12:05:51 +0000 (14:05 +0200)] 
vici: Document that the log event only receives messages on level 0 and 1

2 months agoMerge branch 'initiate-cancel'
Tobias Brunner [Mon, 19 May 2025 15:21:57 +0000 (17:21 +0200)] 
Merge branch 'initiate-cancel'

Allow proper shutdown if a deadlock is caused by too many concurrent
blocking initiation requests.

References strongswan/strongswan#2776

2 months agovici: Make threads handling requests get canceled explicitly
Tobias Brunner [Tue, 13 May 2025 14:47:13 +0000 (16:47 +0200)] 
vici: Make threads handling requests get canceled explicitly

Threads initiating SAs can get stuck on the semaphore in
wait_for_listener() during shutdown if the corresponding job is never
executed.  A particular case when this can happen is if more initiations
are triggered than worker threads are available.  This causes a (known)
deadlock as no workers are free anymore to process jobs (for inbound
messages or timeouts etc.), including the one to initiate an SA.
This change at least allows a proper shutdown.

2 months agovici: Don't pass stack variable to thread cleanup handler
Tobias Brunner [Tue, 13 May 2025 14:43:07 +0000 (16:43 +0200)] 
vici: Don't pass stack variable to thread cleanup handler

The variable seems to get overwritten during cleanup, causing a
segmentation fault because either the pointer and/or the length is
invalid.

2 months agocontroller: Avoid memory leak if initiate job is never executed
Tobias Brunner [Tue, 13 May 2025 14:35:40 +0000 (16:35 +0200)] 
controller: Avoid memory leak if initiate job is never executed

This can happen if the daemon is terminated while an initiation is
pending.

2 months agouci: Remove obsolete and broken plugin
Tobias Brunner [Mon, 19 May 2025 13:49:58 +0000 (15:49 +0200)] 
uci: Remove obsolete and broken plugin

The plugin was apparently broken for years because it uses functions that
don't exist anymore.  It was quite limited anyway, so it was never really
used in OpenWrt to begin with (instead they generate configs in a custom
init script).

2 months agoconfigure: Add missing dependency of lib-prefix.m4
Tobias Brunner [Tue, 13 May 2025 15:51:09 +0000 (17:51 +0200)] 
configure: Add missing dependency of lib-prefix.m4

Fixes: 7ec0101250bf ("Include lib-prefix.m4 directly and remove gettext dependency")
2 months agoconfigure: Simplify inclusion of M4 macros
Tobias Brunner [Tue, 13 May 2025 15:50:35 +0000 (17:50 +0200)] 
configure: Simplify inclusion of M4 macros