Commit Graph

17136 Commits

Author SHA1 Message Date
Tobias Brunner 28b702ad8b xfrmi: Use helpers for nested Netlink attributes 2019-04-04 09:31:38 +02:00
Tobias Brunner 2feba5aa22 kernel-netlink: Add helper functions for nested attributes 2019-04-04 09:31:38 +02:00
Tobias Brunner 760d7c9b4f testing: Add scenarios that use XFRM interfaces
The network namespace scenario requires a kernel patch in 4.19 and 4.20
kernels (the fix is included in 5.0 kernels).
2019-04-04 09:31:38 +02:00
Tobias Brunner 801a5d3133 kernel-netlink: Don't install routes for CHILD_SAs with interface ID 2019-04-04 09:31:38 +02:00
Tobias Brunner 5b2078ad09 testing: Enable XFRM interfaces and network namespaces in 4.19 and 5.0 kernel 2019-04-04 09:31:38 +02:00
Tobias Brunner d74ddd7893 xfrmi: Move to a separate directory to fix monolithic build 2019-04-04 09:31:38 +02:00
Tobias Brunner eef9236602 kernel-netlink: Add --list option to XFRM interfaces utility 2019-04-04 09:31:38 +02:00
Tobias Brunner 19b6d9a622 swanctl: Report interface IDs in --list-sas 2019-04-04 09:31:38 +02:00
Tobias Brunner aa841dbbfc vici: Report interface IDs 2019-04-04 09:31:38 +02:00
Tobias Brunner 3fa8c3e529 updown: Pass interface ID to updown script 2019-04-04 09:31:38 +02:00
Tobias Brunner 8ab336285a ike: Reuse interface ID during CHILD_SA rekeyings 2019-04-04 09:31:38 +02:00
Tobias Brunner a6014d99b7 child-sa: Configure interface ID on SAs and policies 2019-04-03 12:00:08 +02:00
Tobias Brunner 18ed5a07db vici: Make interface ID configurable 2019-04-03 12:00:08 +02:00
Tobias Brunner 07166ce25e ipsec-types: Add helper to parse interface ID 2019-04-03 12:00:08 +02:00
Tobias Brunner f99bd2a5a6 kernel-interface: Consider interface ID when allocating reqids 2019-04-03 12:00:08 +02:00
Tobias Brunner 72c96dbf9f child-cfg: Add property for interface ID 2019-04-03 12:00:08 +02:00
Tobias Brunner b32c3ce8fe kernel-netlink: Make interface ID configurable on SAs and policies 2019-04-03 12:00:08 +02:00
Tobias Brunner d1cd2a0541 include: Add XFRM attribute identifier for interface ID 2019-04-03 12:00:08 +02:00
Tobias Brunner 888593bb5b kernel-netlink: Add utility to create XFRM interfaces
This is mainly to see what's necessary to create them (in case we
integrate this into the daemon) and to experiment in our testing
environment without having to add a patched version of iproute2 (the
4.20.0 version in stretch-backports doesn't support XFRM interfaces
yet).  The regular version of iproute2 can be used for other operations
with these interfaces (delete, up, addrs etc.).
2019-04-03 12:00:08 +02:00
Tobias Brunner 735f9e6eb6 kernel-netlink: Calculate length of Netlink messages correctly
This is relevant when adding e.g. strings whose length are not aligned.
2019-04-03 12:00:08 +02:00
Tobias Brunner f43302dc10 Use Botan 2.10.0 for tests 2019-04-01 11:01:46 +02:00
Andreas Steffen 7b5eee65a0 Version bump to 5.8.0dr2 2019-03-30 17:11:34 +01:00
Andreas Steffen 195ee25dba testing: Updated expired certificates 2019-03-30 17:10:51 +01:00
Andreas Steffen d93532553c Testing: Removed tnc/tnccs-20-server-retry scenario 2019-03-29 17:04:43 +01:00
Andreas Steffen 6fcb3baae8 Corrected use of PB-TNC CRETRY and SRETRY batches
The PB-TNC finite state machine according to section 3.2 of RFC 5793
was not correctly implemented when sending either a CRETRY or SRETRY
batch. These batches can only be sent in the "Decided" state and a
CRETRY batch can immediately carry all messages usually transported
by a CDATA batch. strongSwan currently is not able to send a SRETRY
batch since full-duplex mode for PT-TLS isn't supported yet.
2019-03-29 17:04:43 +01:00
Tobias Brunner 35b82000f1 testing: Disable gcrypt plugin for swanctl
Sometimes swanctl hangs when initializing the plugin and it apparently
gathers entropy.
2019-03-28 18:16:56 +01:00
Tobias Brunner d49ad922c1 conf: Use actually configured path for strongswan.conf
References #2984.
2019-03-27 10:07:16 +01:00
Tobias Brunner 333adbc25b generator: Don't print any tainted values in DBG3 messages for U_INT_4
The bits not written to are marked tainted by valgrind, don't print
them in the debug messages.  Also use more specific printf-specifiers
for other values.
2019-03-27 10:00:09 +01:00
Sheena Mira-ato 69cbe2ca3f trap-manager: Wait for install to finish before uninstalling
There was a race condition between install() and uninstall()
where one thread was in the process of installing a trap
entry, and had destroyed the child_sa, while the other
thread was uninstalling the same trap entry and ended up
trying to destroy the already destroyed child_sa, resulting
in a segmentation fault in the destroy_entry() function.

The uninstall() function needs to wait until all the threads
are done with the installing before proceeding to uninstall
a trap entry.

Closes strongswan/strongswan#131.
2019-03-27 09:38:20 +01:00
Tobias Brunner 6ec9f68f32 sql: Handle %any better when looking up shared secrets
This can be the case for IKEv1 since 419ae9a20a ("ikev1: Default remote
identity to %any for PSK lookup if not configured").

Closes strongswan/strongswan#128.
2019-03-14 13:55:58 +01:00
Tobias Brunner 4f8c00e3ed Merge branch 'nm-ipv6'
Adds support for IPv6 to the NetworkManager backend and plugin.

Fixes #1143, #2586.
2019-03-14 13:46:33 +01:00
Tobias Brunner 398ea12cdb nm: Remove deprecated variables from autogen.sh 2019-03-14 13:42:08 +01:00
Tobias Brunner 05b7f1cbfe charon-nm: Add IPv6 support 2019-03-14 13:42:08 +01:00
Tobias Brunner 0af3a4f103 charon-nm: Handle IPv6 DNS server attributes 2019-03-14 13:42:08 +01:00
Tobias Brunner 0b117dc960 charon-nm: Set local address to %any so IPv6 may be used as outer address 2019-03-14 13:42:08 +01:00
Tobias Brunner 5538e29071 charon-nm: Request virtual IPv6 address and appropriate TS 2019-03-14 13:42:08 +01:00
Tobias Brunner 3567bf60ac nm: Enable IPv6 tab in NM connection dialog 2019-03-14 13:42:08 +01:00
Tobias Brunner 83674787d5 forecast: Only reinject packets that are marked or from the configured interface
This seems to avoid broadcast loops (i.e. processing and reinjecting the
same broadcast packet over and over again) as the packets we send via
AF_PACKET socket are neither marked nor from that interface.
2019-03-14 11:56:20 +01:00
Tobias Brunner 00a953d090 kernel-netlink: Use address labels instead of deprecation for IPv6 virtual IPs
In order to avoid that the kernel uses virtual tunnel IPs for traffic
over physical interfaces we previously deprecated the virtual IP.  While
this is working it is not ideal.  This patch adds address labels for
virtual IPs, which should force the kernel to avoid such addresses to
reach any destination unless there is an explicit route that uses it as
source address.
2019-03-14 11:33:59 +01:00
Tobias Brunner b4a23e3cea Merge branch 'android-updates'
Adds a copy function for VPN profiles and an option to set custom DNS
servers.
2019-03-14 10:56:07 +01:00
Andreas Steffen fa1f4d199e testing: Prolonged Duck end entity certificate 2019-03-13 19:02:42 +01:00
Andreas Steffen 08a7326181 Version bump to 5.8.0dr1 2019-03-13 19:02:42 +01:00
Tobias Brunner 023d47a08a child-create: Add missing space in DH retry log message 2019-03-13 10:30:49 +01:00
Tobias Brunner 7b9a8b3f75 android: New release after adding copy function and DNS server config 2019-03-08 17:08:11 +01:00
Tobias Brunner 347665420b Merge branch 'openssl-chapoly'
Adds support for ChaCha20-Poly1305 via OpenSSL.

Fixes #2946.
2019-03-08 15:56:01 +01:00
Tobias Brunner a21710d380 openssl: Add support for ChaCha20-Poly1305
It's available since OpenSSL 1.1.0.
2019-03-08 15:55:52 +01:00
Tobias Brunner 8fc6b2d0e0 openssl: Generalize the GCM implementation a bit
This will allow us to use the implementation also for other algorithms.
2019-03-08 15:55:52 +01:00
Tobias Brunner 451c2e7d58 Merge branch 'ikev1-redundant-updown'
Avoids calling updown script for redundant CHILD_SAs after IKEv1 rekey
collisions.

Fixes #2902.
2019-03-08 15:52:39 +01:00
Tobias Brunner 7f5cef5d1c ikev1: Don't trigger updown event and close action for redundant CHILD_SAs 2019-03-08 15:49:34 +01:00
Tobias Brunner bbc3d2a016 task-manager-v1: Add utility function to check if CHILD_SA is redundant 2019-03-08 15:49:34 +01:00