]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
10 months agopubkey-authenticator: Don't use the certificate ID to build auth octets when cert_id_... cert-id-binding-option
Martin Willi [Fri, 18 Jan 2013 10:52:47 +0000 (11:52 +0100)] 
pubkey-authenticator: Don't use the certificate ID to build auth octets when cert_id_binding = no

10 months agopubkey-authenticator: Added an option to allow mismatches between IKE identity and...
Martin Willi [Thu, 23 Feb 2012 14:05:28 +0000 (15:05 +0100)] 
pubkey-authenticator: Added an option to allow mismatches between IKE identity and certificates

10 months agodhcp: Fix warning with newer compilers
Tobias Brunner [Fri, 16 Jun 2023 07:35:12 +0000 (09:35 +0200)] 
dhcp: Fix warning with newer compilers

10 months agoresolve: Maintain order of DNS servers also when installing in resolv.conf
Tobias Brunner [Fri, 16 Jun 2023 11:46:17 +0000 (13:46 +0200)] 
resolve: Maintain order of DNS servers also when installing in resolv.conf

This always writes the complete set of DNS servers to make modifications
simpler.

10 months agoresolve: Try to maintain the order of DNS servers if using resolvconf
Tobias Brunner [Thu, 15 Jun 2023 15:54:08 +0000 (17:54 +0200)] 
resolve: Try to maintain the order of DNS servers if using resolvconf

Since 17fd304e60df ("resolve: Don't install individual servers via
resolvconf"), DNS servers were sorted if getting installed via resolvconf.
In some setups the order might be important (even though relying on it
isn't a good idea in general as stub resolvers are free to use all of
the servers as they please).

10 months agocharon-svc: Add missing closing parenthesis in version output
Tobias Brunner [Mon, 19 Jun 2023 12:54:06 +0000 (14:54 +0200)] 
charon-svc: Add missing closing parenthesis in version output

10 months agoUse wolfSSL 5.6.2 for tests
Tobias Brunner [Tue, 13 Jun 2023 08:13:10 +0000 (10:13 +0200)] 
Use wolfSSL 5.6.2 for tests

ECC keys can now be smaller so we can't access the private key directly
anymore.

10 months agoVersion bump to 5.9.11 5.9.11
Andreas Steffen [Mon, 12 Jun 2023 05:50:02 +0000 (07:50 +0200)] 
Version bump to 5.9.11

10 months agoVersion bump to 5.9.11rc1 5.9.11rc1
Andreas Steffen [Thu, 8 Jun 2023 08:42:17 +0000 (10:42 +0200)] 
Version bump to 5.9.11rc1

10 months agoNEWS: Add news for 5.9.11
Tobias Brunner [Fri, 2 Jun 2023 13:46:57 +0000 (15:46 +0200)] 
NEWS: Add news for 5.9.11

10 months agopki: Add --label options to --est* command synopsis
Tobias Brunner [Fri, 2 Jun 2023 10:55:07 +0000 (12:55 +0200)] 
pki: Add --label options to --est* command synopsis

Also fixes some formatting in the man pages.

10 months agogithub: Use new cache storage properties for sonarcloud
Tobias Brunner [Fri, 2 Jun 2023 09:37:06 +0000 (11:37 +0200)] 
github: Use new cache storage properties for sonarcloud

10 months agoopenssl: Fix memory leak if FIPS provider isn't available
Tobias Brunner [Fri, 2 Jun 2023 09:27:39 +0000 (11:27 +0200)] 
openssl: Fix memory leak if FIPS provider isn't available

10 months agoFixed some typos, courtesy of codespell
Tobias Brunner [Fri, 2 Jun 2023 08:19:32 +0000 (10:19 +0200)] 
Fixed some typos, courtesy of codespell

10 months agocredential-manager: Improve selection of local certificate and trust chain
Tobias Brunner [Fri, 12 May 2023 16:36:30 +0000 (18:36 +0200)] 
credential-manager: Improve selection of local certificate and trust chain

The previous code was problematic if a certificate request for a known
but unrelated CA was received and the local trust chain was incomplete.
Due to the received anchor, the incomplete trust chain was dismissed and
any intermediate CA certificates were, therefore, not sent to the peer.

This new approach doesn't dismiss an incomplete trust chain, but prefers
one that can be resolved to a received anchor.  If no such chain is found,
the first one is used.

11 months agogithub: Use OpenSSL 3.1.1 for tests
Tobias Brunner [Wed, 31 May 2023 13:45:02 +0000 (15:45 +0200)] 
github: Use OpenSSL 3.1.1 for tests

11 months agoMerge branch 'libipsec-raw-esp'
Tobias Brunner [Tue, 23 May 2023 11:19:57 +0000 (13:19 +0200)] 
Merge branch 'libipsec-raw-esp'

This adds support for sending/receiving ESP packets without UDP
encapsulation to libipsec and kernel-libipsec.  Only Linux is currently
supported and the feature is disabled by default.

11 months agotesting: Add libipsec scenarios that exchange raw ESP packets
Tobias Brunner [Mon, 15 May 2023 13:55:30 +0000 (15:55 +0200)] 
testing: Add libipsec scenarios that exchange raw ESP packets

11 months agokernel-libipsec: Add support to send/receive raw ESP packets
Tobias Brunner [Thu, 11 May 2023 16:34:58 +0000 (18:34 +0200)] 
kernel-libipsec: Add support to send/receive raw ESP packets

This is currently only supported on Linux and with the appropriate
permissions.

Since it's experimental, it's disabled by default.

The log messages for each sent and received ESP message are logged in NET
like the ones in the socket-default plugin for UDP-encapsulated messages.

11 months agolibipsec: Move restrictions regarding UDP encapsulation to users
Tobias Brunner [Thu, 11 May 2023 15:04:00 +0000 (17:04 +0200)] 
libipsec: Move restrictions regarding UDP encapsulation to users

11 months agolibipsec: Instruct ESP sender whether to use UDP encapsulation
Tobias Brunner [Thu, 11 May 2023 14:56:07 +0000 (16:56 +0200)] 
libipsec: Instruct ESP sender whether to use UDP encapsulation

11 months agoandroid: Use CALLBACK for libipsec-related callbacks
Tobias Brunner [Thu, 11 May 2023 14:21:07 +0000 (16:21 +0200)] 
android: Use CALLBACK for libipsec-related callbacks

11 months agokernel-libipsec: Use CALLBACK for libipsec callbacks
Tobias Brunner [Thu, 11 May 2023 14:17:09 +0000 (16:17 +0200)] 
kernel-libipsec: Use CALLBACK for libipsec callbacks

11 months agoipsec-sa: Store whether to use UDP encapsulation on the SA
Tobias Brunner [Thu, 11 May 2023 13:46:03 +0000 (15:46 +0200)] 
ipsec-sa: Store whether to use UDP encapsulation on the SA

11 months agoMerge branch 'libipsec-trap'
Tobias Brunner [Tue, 23 May 2023 11:17:19 +0000 (13:17 +0200)] 
Merge branch 'libipsec-trap'

This adds support for trap policies to libipsec.

11 months agotesting: Add libipsec/net2net-trap scenario
Tobias Brunner [Thu, 4 May 2023 14:00:37 +0000 (16:00 +0200)] 
testing: Add libipsec/net2net-trap scenario

11 months agokernel-libipsec: Forward acquires from libipsec to the daemon
Tobias Brunner [Thu, 4 May 2023 12:42:53 +0000 (14:42 +0200)] 
kernel-libipsec: Forward acquires from libipsec to the daemon

11 months agoipsec-processor: Trigger acquire if no matching outbound SA is found
Tobias Brunner [Thu, 4 May 2023 12:32:49 +0000 (14:32 +0200)] 
ipsec-processor: Trigger acquire if no matching outbound SA is found

11 months agoipsec-sa-mgr: Optionally keep track of acquires for outbound SAs
Tobias Brunner [Thu, 4 May 2023 12:20:09 +0000 (14:20 +0200)] 
ipsec-sa-mgr: Optionally keep track of acquires for outbound SAs

Currently just based on the reqid.  An acquire for the same reqid is
triggered at most every 10 seconds (gets ignored in trap_manager_t if
the SA is still getting established).

Entries are only cleaned up if an SA is eventually installed (similar to
the allocated SPIs).  Should that ever be a problem, we could probably
schedule a job that regularly flushes old entries.

11 months agolibipsec: Add possibility to relay acquire events
Tobias Brunner [Fri, 20 Sep 2013 06:43:46 +0000 (08:43 +0200)] 
libipsec: Add possibility to relay acquire events

Keeping it simple and just forwarding the reqid.

11 months agoike: Use a struct to store retransmission settings
Tobias Brunner [Tue, 2 May 2023 15:54:07 +0000 (17:54 +0200)] 
ike: Use a struct to store retransmission settings

The calculation of the timeout is also shared now and the total
timeout in seconds is corrected in case retransmit_base is <= 1.

This could make it easier in the future to apply different retransmission
settings to messages/exchanges.

11 months agopki: Make --dn optional for certificate renewals via --scep command
Tobias Brunner [Thu, 11 May 2023 10:29:10 +0000 (12:29 +0200)] 
pki: Make --dn optional for certificate renewals via --scep command

When using OpenXPKI, the subject DN in the renewal request has to match
the previous DN exactly.  However, because OpenXPKI may add a bunch of
DC/O RDNs to subjects of issued certificates, running --scep with the
same --dn that was used for the original request won't work (results in
a "Client error / malformed request badRequest" error even after enabling
`renewal_via_pkcs_req`).  This simplifies renewals as --dn can just be
omitted and extracted from the original certificate to avoid this issue.

References strongswan/strongswan#1689

11 months agoMerge branch 'debug-level-build'
Tobias Brunner [Tue, 16 May 2023 10:48:22 +0000 (12:48 +0200)] 
Merge branch 'debug-level-build'

This fixes the build with DEBUG_LEVEL < 4, which was broken when building
from the repository since --enable-warnings was made the default.

Although, most issues only occurred with the level reduced to 0/-1.  And
while removing debug statements at compile time completely is probably
not useful in production, there might be use cases in certain benchmarking
scenarios.  Also, with the recent changes to the controller there should
only rarely be a listener registered at a higher log level so the overhead
for those higher-level DBG statements is minimal.

Anyway, reducing the log level at compile time is a documented feature and
at least DEBUG_LEVEL=3 could be useful to prevent leaking sensitive
information via logs from the outset.  So we should make sure compilation
doesn't fail.

11 months agogithub: Add build with DBG completely disabled
Tobias Brunner [Mon, 1 May 2023 10:35:08 +0000 (12:35 +0200)] 
github: Add build with DBG completely disabled

11 months agosec-updater: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Tue, 2 May 2023 12:16:02 +0000 (14:16 +0200)] 
sec-updater: Fix build with DEBUG_LEVEL < 1

11 months agosw-collector: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Tue, 2 May 2023 12:15:43 +0000 (14:15 +0200)] 
sw-collector: Fix build with DEBUG_LEVEL < 1

11 months agoconftest: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Wed, 3 May 2023 10:31:45 +0000 (12:31 +0200)] 
conftest: Fix build with DEBUG_LEVEL < 1

11 months agopki: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:28:03 +0000 (12:28 +0200)] 
pki: Fix build with DEBUG_LEVEL < 1

11 months agoselinux: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:18:46 +0000 (12:18 +0200)] 
selinux: Fix build with DEBUG_LEVEL < 1

11 months agoradattr: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Wed, 3 May 2023 10:29:36 +0000 (12:29 +0200)] 
radattr: Fix build with DEBUG_LEVEL < 1

11 months agosystime-fix: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:17:25 +0000 (12:17 +0200)] 
systime-fix: Fix build with DEBUG_LEVEL < 1

11 months agokernel-netlink: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Mon, 1 May 2023 10:16:12 +0000 (12:16 +0200)] 
kernel-netlink: Fix build with DEBUG_LEVEL < 2

11 months agoha: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:14:57 +0000 (12:14 +0200)] 
ha: Fix build with DEBUG_LEVEL < 1

11 months agodhcp: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:12:54 +0000 (12:12 +0200)] 
dhcp: Fix build with DEBUG_LEVEL < 1

11 months agotnc-ifmap: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Wed, 3 May 2023 10:28:51 +0000 (12:28 +0200)] 
tnc-ifmap: Fix build with DEBUG_LEVEL < 2

11 months agoeap-peap: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Wed, 3 May 2023 10:27:48 +0000 (12:27 +0200)] 
eap-peap: Fix build with DEBUG_LEVEL < 1

11 months agoeap-ttls: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Wed, 3 May 2023 10:23:58 +0000 (12:23 +0200)] 
eap-ttls: Fix build with DEBUG_LEVEL < 1

11 months agoeap-radius: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:11:32 +0000 (12:11 +0200)] 
eap-radius: Fix build with DEBUG_LEVEL < 1

11 months agoeap-dynamic: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Wed, 3 May 2023 10:22:05 +0000 (12:22 +0200)] 
eap-dynamic: Fix build with DEBUG_LEVEL < 2

11 months agoeap-mschapv2: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:10:11 +0000 (12:10 +0200)] 
eap-mschapv2: Fix build with DEBUG_LEVEL < 1

11 months agovici: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Mon, 1 May 2023 10:06:59 +0000 (12:06 +0200)] 
vici: Fix build with DEBUG_LEVEL < 2

11 months agoforecast: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Wed, 3 May 2023 10:16:15 +0000 (12:16 +0200)] 
forecast: Fix build with DEBUG_LEVEL < 2

11 months agosave-keys: Fix build with DEBUG_LEVEL < 0
Tobias Brunner [Wed, 3 May 2023 08:52:14 +0000 (10:52 +0200)] 
save-keys: Fix build with DEBUG_LEVEL < 0

11 months agomode-config: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:05:59 +0000 (12:05 +0200)] 
mode-config: Fix build with DEBUG_LEVEL < 1

11 months agokeymat_v1: Fix build with DEBUG_LEVEL < 3
Tobias Brunner [Mon, 1 May 2023 10:05:02 +0000 (12:05 +0200)] 
keymat_v1: Fix build with DEBUG_LEVEL < 3

11 months agoike-init: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:04:22 +0000 (12:04 +0200)] 
ike-init: Fix build with DEBUG_LEVEL < 1

11 months agoike-config: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 10:03:06 +0000 (12:03 +0200)] 
ike-config: Fix build with DEBUG_LEVEL < 1

11 months agochild-create: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 09:59:46 +0000 (11:59 +0200)] 
child-create: Fix build with DEBUG_LEVEL < 1

11 months agopubkey-authenticator: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 09:57:16 +0000 (11:57 +0200)] 
pubkey-authenticator: Fix build with DEBUG_LEVEL < 1

11 months agoeap-authenticator: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 09:55:36 +0000 (11:55 +0200)] 
eap-authenticator: Fix build with DEBUG_LEVEL < 1

11 months agoike-sa: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 09:53:49 +0000 (11:53 +0200)] 
ike-sa: Fix build with DEBUG_LEVEL < 1

11 months agomessage: Fix build with DEBUG__LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 09:51:57 +0000 (11:51 +0200)] 
message: Fix build with DEBUG__LEVEL < 1

11 months agogenerator: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Mon, 1 May 2023 09:48:36 +0000 (11:48 +0200)] 
generator: Fix build with DEBUG_LEVEL < 2

11 months agobackend-manager: Fix build with DEBUG_LEVEL < 3
Tobias Brunner [Mon, 1 May 2023 09:44:17 +0000 (11:44 +0200)] 
backend-manager: Fix build with DEBUG_LEVEL < 3

11 months agolibimcv: Fix build with DEBUG_LEVEL < 3
Tobias Brunner [Tue, 2 May 2023 12:11:44 +0000 (14:11 +0200)] 
libimcv: Fix build with DEBUG_LEVEL < 3

11 months agolibtpmtss: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Tue, 2 May 2023 09:16:22 +0000 (11:16 +0200)] 
libtpmtss: Fix build with DEBUG_LEVEL < 2

11 months agotnccs-20: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Tue, 18 Apr 2023 15:35:36 +0000 (17:35 +0200)] 
tnccs-20: Fix build with DEBUG_LEVEL < 2

11 months agotnccs-11: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Mon, 1 May 2023 14:30:06 +0000 (16:30 +0200)] 
tnccs-11: Fix build with DEBUG_LEVEL < 2

11 months agoradius-client: Fix build with DEBUG_LEVEL < 3
Tobias Brunner [Tue, 18 Apr 2023 15:34:58 +0000 (17:34 +0200)] 
radius-client: Fix build with DEBUG_LEVEL < 3

11 months agolibtls: Fix build with DEBUG_LEVEL < 3
Tobias Brunner [Tue, 18 Apr 2023 14:57:16 +0000 (16:57 +0200)] 
libtls: Fix build with DEBUG_LEVEL < 3

11 months agosimaka-manager: Fix counter in log message when getting quintuplets
Tobias Brunner [Tue, 18 Apr 2023 14:51:21 +0000 (16:51 +0200)] 
simaka-manager: Fix counter in log message when getting quintuplets

Also fixes the build with DEBUG_LEVEL < 1.

11 months agoesp-packet: Fix build with DEBUG_LEVEL < 3
Tobias Brunner [Tue, 18 Apr 2023 14:49:26 +0000 (16:49 +0200)] 
esp-packet: Fix build with DEBUG_LEVEL < 3

11 months agodrbg: Fix build with DEBUG_LEVEL < 4
Tobias Brunner [Tue, 18 Apr 2023 14:48:08 +0000 (16:48 +0200)] 
drbg: Fix build with DEBUG_LEVEL < 4

11 months agobliss: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Mon, 1 May 2023 12:57:00 +0000 (14:57 +0200)] 
bliss: Fix build with DEBUG_LEVEL < 2

11 months agosqlite: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Tue, 18 Apr 2023 14:46:02 +0000 (16:46 +0200)] 
sqlite: Fix build with DEBUG_LEVEL < 2

11 months agopkcs7: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Tue, 18 Apr 2023 14:44:54 +0000 (16:44 +0200)] 
pkcs7: Fix build with DEBUG_LEVEL < 2

11 months agoconstraints: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 09:10:47 +0000 (11:10 +0200)] 
constraints: Fix build with DEBUG_LEVEL < 1

11 months agorevocation: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 09:07:18 +0000 (11:07 +0200)] 
revocation: Fix build with DEBUG_LEVEL < 1

11 months agox509: Fix build with DEBUG_LEVEL < 2 for structures that ignore unknown critical...
Tobias Brunner [Tue, 18 Apr 2023 14:42:30 +0000 (16:42 +0200)] 
x509: Fix build with DEBUG_LEVEL < 2 for structures that ignore unknown critical extensions

11 months agoplugin-loader: Fix build with DEBUG_LEVEL < 3
Tobias Brunner [Tue, 18 Apr 2023 14:38:18 +0000 (16:38 +0200)] 
plugin-loader: Fix build with DEBUG_LEVEL < 3

11 months agoauth-cfg: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 08:46:28 +0000 (10:46 +0200)] 
auth-cfg: Fix build with DEBUG_LEVEL < 1

11 months agocertificate: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 08:37:01 +0000 (10:37 +0200)] 
certificate: Fix build with DEBUG_LEVEL < 1

11 months agocredential-factory: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 08:38:24 +0000 (10:38 +0200)] 
credential-factory: Fix build with DEBUG_LEVEL < 1

11 months agocrypto-tester: Fix build with DEBUG_LEVEL < 1
Tobias Brunner [Mon, 1 May 2023 08:35:05 +0000 (10:35 +0200)] 
crypto-tester: Fix build with DEBUG_LEVEL < 1

11 months agoasn1: Fix build with DEBUG_LEVEL < 2
Tobias Brunner [Tue, 18 Apr 2023 14:34:38 +0000 (16:34 +0200)] 
asn1: Fix build with DEBUG_LEVEL < 2

11 months agodebug: Add macro to mark variables that are only used in DBG statements
Tobias Brunner [Mon, 1 May 2023 08:44:42 +0000 (10:44 +0200)] 
debug: Add macro to mark variables that are only used in DBG statements

Some variables that are only assigned to be used in DBG statements
will otherwise trigger a "set but not used" warning/error if DEBUG_LEVEL
is too low.

11 months agodoxygen: Enable JS search engine
Tobias Brunner [Thu, 4 May 2023 11:42:06 +0000 (13:42 +0200)] 
doxygen: Enable JS search engine

11 months agodoxygen: Fix syntax for some output parameters
Tobias Brunner [Thu, 4 May 2023 11:39:15 +0000 (13:39 +0200)] 
doxygen: Fix syntax for some output parameters

12 months agoikev1: Migrate CHILD_SAs when IKE_SA is reset during reauthentication
Tobias Brunner [Thu, 20 Apr 2023 08:22:31 +0000 (10:22 +0200)] 
ikev1: Migrate CHILD_SAs when IKE_SA is reset during reauthentication

When we reset the initiator SPI, we have to migrate the adopted children
again so the correct IKE_SA can later be checked out.

Closes strongswan/strongswan#1663

12 months agovici: Improve log messages for terminate/rekey() in case of combined filters
Tobias Brunner [Thu, 27 Apr 2023 14:34:23 +0000 (16:34 +0200)] 
vici: Improve log messages for terminate/rekey() in case of combined filters

As long as any `child*` selector is received, only CHILD_SAs will be
terminated or rekeyed.  Any passed `ike*` selectors will only be used to
filter the IKE_SAs when looking for matching CHILD_SAs.  However, the
previous log messages seemed to indicate that IKE_SAs will also be
terminated/rekeyed.

References strongswan/strongswan#1655

12 months agovici: Create default TCP socket on Windows in Python bindings
Tobias Brunner [Thu, 20 Apr 2023 14:26:52 +0000 (16:26 +0200)] 
vici: Create default TCP socket on Windows in Python bindings

This uses the same value as VICI_DEFAULT_URI.

References strongswan/strongswan#1655

12 months agocharon-systemd: Add a log message when the daemon is starting
Tobias Brunner [Wed, 19 Apr 2023 14:10:26 +0000 (16:10 +0200)] 
charon-systemd: Add a log message when the daemon is starting

While there is a status message sent to systemd (can be seen e.g. in
systemctl status), the version etc. is currently not logged to the
journal, syslog or any log files.

12 months agoleak-detective: Add `on_exit(3)` to whitelist
Tobias Brunner [Tue, 18 Apr 2023 12:17:37 +0000 (14:17 +0200)] 
leak-detective: Add `on_exit(3)` to whitelist

Seems to allocate some TLS value in newer glibc versions.

12 months agocontroller: Add parameter for maximum log level to initiate/terminate_*()
Tobias Brunner [Wed, 19 Apr 2023 14:21:48 +0000 (16:21 +0200)] 
controller: Add parameter for maximum log level to initiate/terminate_*()

Previously, the logger installed by the controller always announced
LEVEL_PRIVATE(4), which produced completely useless logging calls with
the common clients (vici/stroke) whose default log level is LEVEL_CTRL(1).
This can produce quite some overhead if there are e.g. a lot of concurrent
initiate() calls.

12 months agocontroller: Ignore log messages unrelated to IKE_SA affected by a command
Tobias Brunner [Wed, 19 Apr 2023 14:17:18 +0000 (16:17 +0200)] 
controller: Ignore log messages unrelated to IKE_SA affected by a command

Until we know which IKE_SA is affected by an initiate() or terminate_*()
command, unrelated log messages that don't have any IKE context (i.e.
the passed `ike_sa` is NULL) would previously get logged.

12 months agowatcher: Prevent busy wait if callback is active and other FDs have events
Tobias Brunner [Tue, 18 Apr 2023 16:18:48 +0000 (18:18 +0200)] 
watcher: Prevent busy wait if callback is active and other FDs have events

Exiting the loop previously could cause watcher to busy wait (i.e.
rebuild the array and call poll() repeatedly) until the active callback
was done.

Assume watcher observes two FDs 15 and 22, which are in the list in that
order.  FD 15 is signaled and its callback gets triggered.  The array of
FDs is rebuilt and does not include 15 anymore.  Now FD 22 is ready for
reading.  However, when enumerating all registered FDs, the loop previously
was exited when reaching FD 15 and seeing that it's active.  FD 22 was
never checked and the array was immediately rebuilt and poll() called.
If the callback for 15 took longer, this was repeated over and over.

This basically reverts d16d5a245f0b ("watcher: Avoid queueing multiple
watcher callbacks at the same time"), whose goal is quite unclear to me.
If it really wanted to allow only a single callback for all FDs, it didn't
achieve that as any FD before an active one would get notified and if
multiple FDs are ready concurrently, they'd all get triggered too.
Skipping entries with active callback makes sense as it avoids a lookup
in the FD array and subsequent revents checks.  But why would we need to
rebuild the array if we see such an entry?  Once the callback is done,
the watcher is notified and the array rebuilt anyway (also if any other
FD was ready and jobs get queued).

12 months agowatcher: Move debug log messages out of mutex
Tobias Brunner [Tue, 18 Apr 2023 13:59:34 +0000 (15:59 +0200)] 
watcher: Move debug log messages out of mutex

The list of FDs is recreated quite often (e.g. due to the kernel-netlink
event sockets) and if a logger depends on watcher_t in some way this
might cause conflicts if the mutex is held.

12 months agowatcher: Make sure to re-activate the correct entry after a callback
Tobias Brunner [Tue, 18 Apr 2023 13:55:10 +0000 (15:55 +0200)] 
watcher: Make sure to re-activate the correct entry after a callback

Since the same FD may be added multiple times (e.g. with separate
callbacks for WATCHER_READ and WATCHER_WRITE), the previous check
might not have found the correct entry.  As the entry can't be removed
while in a callback, the pointer comparison is fine.

12 months agowatcher: Log when watched FDs are added, removed or updated
Tobias Brunner [Tue, 18 Apr 2023 13:52:23 +0000 (15:52 +0200)] 
watcher: Log when watched FDs are added, removed or updated

12 months agowatcher: Only log number of managed FDs
Tobias Brunner [Tue, 18 Apr 2023 13:50:42 +0000 (15:50 +0200)] 
watcher: Only log number of managed FDs

Adding the internal notify FD might be confusing.