Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | ike-cfg: Fix memory leak when matching against ranges | Tobias Brunner | 2017-05-29 | 1 | -1/+1 |
| | | | | | | | traffic_selector_t::to_subnet() always sets the net/host (unless the address family was invalid). Fixes: 3070697f9f7c ("ike: support multiple addresses, ranges and subnets in IKE address config") | ||||
* | ike: Apply retransmission_limit before applying the jitter | Tobias Brunner | 2017-05-26 | 2 | -8/+8 |
| | |||||
* | eap-sim-file: Remove redundant enumerator allocation | Tobias Brunner | 2017-05-26 | 1 | -1/+1 |
| | |||||
* | sql: Remove redundant enumerator allocation | Tobias Brunner | 2017-05-26 | 1 | -1/+1 |
| | | | | | | Interestingly, this doesn't show up in the regression tests because the compiler removes the first assignment (and thus the allocation) due to -O2 that's included in our default CFLAGS. | ||||
* | Fixed some typos, courtesy of codespell | Tobias Brunner | 2017-05-26 | 4 | -5/+5 |
| | |||||
* | linked-list: Change return value of find_first() and signature of its callback | Tobias Brunner | 2017-05-26 | 18 | -227/+244 |
| | | | | This avoids the unportable five pointer hack. | ||||
* | linked-list: Change interface of callback for invoke_function() | Tobias Brunner | 2017-05-26 | 5 | -34/+65 |
| | | | | This avoids the unportable five pointer hack. | ||||
* | Change interface for enumerator_create_filter() callback | Tobias Brunner | 2017-05-26 | 23 | -393/+551 |
| | | | | | This avoids the unportable 5 pointer hack, but requires enumerating in the callback. | ||||
* | Migrate all enumerators to venumerate() interface change | Tobias Brunner | 2017-05-26 | 34 | -169/+333 |
| | |||||
* | vici: Make 96-bit truncation for SHA-256 configurable | Tobias Brunner | 2017-05-26 | 1 | -0/+11 |
| | |||||
* | stroke: Make 96-bit truncation for SHA-256 configurable | Tobias Brunner | 2017-05-26 | 2 | -1/+3 |
| | |||||
* | child-cfg: Optionally use 96-bit truncation for HMAC-SHA-256 | Tobias Brunner | 2017-05-26 | 2 | -0/+11 |
| | | | | | | | | The correct truncation is 128-bit but some implementations insist on using 96-bit truncation. With strongSwan this can be negotiated using an algorithm identifier from a private range. But this doesn't work with third-party implementations. This adds an option to use 96-bit truncation even if the official identifier is used. | ||||
* | android-log: Link against liblog | Tobias Brunner | 2017-05-26 | 1 | -0/+1 |
| | |||||
* | unit-tests: Check installed IPsec SAs in child-rekey tests | Tobias Brunner | 2017-05-23 | 1 | -3/+94 |
| | |||||
* | unit-tests: Add assert to check for installed IPsec SAs | Tobias Brunner | 2017-05-23 | 2 | -3/+115 |
| | |||||
* | unit-tests: Migrate cached IPsec SAs to new IKE_SAs during rekeying | Tobias Brunner | 2017-05-23 | 1 | -0/+42 |
| | |||||
* | unit-tests: Keep track of installed IPsec SAs in mock kernel_ipsec_t ↵ | Tobias Brunner | 2017-05-23 | 2 | -4/+136 |
| | | | | implementation | ||||
* | child-delete: Delay the removal of the inbound SA of rekeyed CHILD_SAs | Tobias Brunner | 2017-05-23 | 3 | -128/+412 |
| | | | | | | | | After deleting a rekeyed CHILD_SA we uninstall the outbound SA but don't destroy the CHILD_SA (and the inbound SA) immediately. We delay it a few seconds or until the SA expires to allow delayed packets to get processed. The CHILD_SA remains in state CHILD_DELETING until it finally gets destroyed. | ||||
* | delete-child-sa-job: Add new constructor that takes the unique ID of a CHILD_SA | Tobias Brunner | 2017-05-23 | 2 | -13/+69 |
| | | | | | This makes sure we delete the right SA in case the addresses got updated in the mean time. | ||||
* | child-sa: Remove state to track installation of half the SA again | Tobias Brunner | 2017-05-23 | 6 | -62/+47 |
| | |||||
* | unit-tests: Overload helper macro to check for outbound SA state | Tobias Brunner | 2017-05-23 | 1 | -2/+30 |
| | |||||
* | child-sa: Expose state of the outbound SA | Tobias Brunner | 2017-05-23 | 2 | -17/+61 |
| | |||||
* | child-sa: Add method to remove the outbound SA and policies | Tobias Brunner | 2017-05-23 | 2 | -5/+78 |
| | |||||
* | child-sa: Keep track whether the outbound SA has been installed or not | Tobias Brunner | 2017-05-23 | 1 | -8/+13 |
| | |||||
* | child-delete: Track flags per individual CHILD_SA | Tobias Brunner | 2017-05-23 | 1 | -47/+78 |
| | |||||
* | ikev2: Delay installation of outbound SAs during rekeying on the responder | Tobias Brunner | 2017-05-23 | 4 | -30/+124 |
| | | | | | | | | The responder has all the information needed to install both SAs before the initiator does. So if the responder immediately installs the outbound SA it might send packets using the new SA which the initiator is not yet able to process. This can be avoided by delaying the installation of the outbound SA until the replaced SA is deleted. | ||||
* | child-sa: Add log message for CHILD_SA state changes | Tobias Brunner | 2017-05-23 | 1 | -0/+4 |
| | |||||
* | child-sa: Add method to associate rekeyed CHILD_SAs with their replacement | Tobias Brunner | 2017-05-23 | 2 | -0/+35 |
| | |||||
* | child-sa: Add methods that allow partial installation of CHILD_SA | Tobias Brunner | 2017-05-23 | 2 | -5/+144 |
| | | | | | | | Using install() for the inbound SA and register_outbound() for the outbound SA followed by install_policies(), will delay the installation of the outbound SA as well as the installation of the outbound policies in the kernel until install_outbound() is called later. | ||||
* | child-sa: Add new state to track installation of only the inbound SA | Tobias Brunner | 2017-05-23 | 2 | -1/+7 |
| | |||||
* | child-sa: Change API used to set/install policies | Tobias Brunner | 2017-05-23 | 6 | -79/+119 |
| | | | | This way we only have to pass the traffic selectors once. | ||||
* | child-sa: Split in- and outbound policy de-/installation | Tobias Brunner | 2017-05-23 | 1 | -62/+127 |
| | | | | Only install outbound fallback policies. | ||||
* | child-create: Trigger NARROW_RESPONDER_POST hook before installing SAs | Tobias Brunner | 2017-05-23 | 1 | -25/+21 |
| | | | | | This makes sure we use the same set of traffic selectors when installing the SAs and installing the policies. | ||||
* | tnc-ifmap: Null-terminate buffer to make sscanf()-calls safe | Tobias Brunner | 2017-05-23 | 1 | -4/+5 |
| | |||||
* | Add plugin constructor registration for all libraries that provide plugins | Tobias Brunner | 2017-05-23 | 2 | -0/+16 |
| | | | | | | | | | | | | | | Unfortunately, we can't just add the generated C file to the sources in Makefile.am as the linker would remove that object file when it notices that no symbol in it is ever referenced. So we include it in the file that contains the library initialization, which will definitely be referenced by the executable. This allows building an almost stand-alone static version of e.g. charon when building with `--enable-monolithic --enable-static --disable-shared` (without `--disable-shared` libtool will only build a version that links the libraries dynamically). External libraries (e.g. gmp or openssl) are not linked statically this way, though. | ||||
* | kernel-netlink: Use total retransmit timeout as acquire timeout | Tobias Brunner | 2017-05-23 | 2 | -13/+23 |
| | | | | | | | By using the total retransmit timeout, modifications of timeout settings automatically reflect on the value of xfrm_acq_expires. If set, the value of xfrm_acq_expires configured by the user takes precedence over the calculated value. | ||||
* | task-manager: Add helper function to calculate the total retransmit timeout | Tobias Brunner | 2017-05-23 | 2 | -1/+42 |
| | |||||
* | ike: Use optional jitter to calculate retransmission timeouts | Tobias Brunner | 2017-05-23 | 3 | -5/+57 |
| | | | | | Also adds an optional limit to avoid very high retransmission timeouts with high numbers of retries. | ||||
* | kernel-netlink: Try to add new inbound SA if update fails | Thomas Egerer | 2017-05-23 | 1 | -3/+12 |
| | | | | | | | | | | | | | | | When establishing a traffic-triggered CHILD_SA involves the setup of an IKE_SA more than one exchange is required. As a result the temporary acquire state may have expired -- even if the acquire expiration (xfrm_acq_expires) time is set properly (165 by default). The expire message sent by the kernel is not processed in charon since no trap can be found by the trap manager. A possible solution could be to track allocated SPIs. But since this is a corner case and the tracking introduces quite a bit of overhead, it seems much more sensible to add a new state if the update of a state fails with NOT_FOUND. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com> | ||||
* | kernel-pfkey: Update SA addresses if supported by the kernel | Tobias Brunner | 2017-05-23 | 1 | -21/+16 |
| | | | | | | Upcoming FreeBSD kernels will support updating the addresses of existing SAs with new SADB_X_EXT_NEW_ADDRESS_SRC|DST extensions for the SADB_UPDATE message. | ||||
* | kernel-pfkey: Use new encap flag on Mac OS X when updating SAs | Tobias Brunner | 2017-05-23 | 1 | -1/+1 |
| | |||||
* | receiver: Restrict init limit to half-open SAs as responder | Thomas Egerer | 2017-05-23 | 1 | -4/+2 |
| | | | | Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com> | ||||
* | kernel-netlink: Update hardware offload attribute when SAs are updated | Tobias Brunner | 2017-05-23 | 1 | -11/+37 |
| | |||||
* | kernel-netlink: Base SA update on correct message in multi-message response | Tobias Brunner | 2017-05-23 | 1 | -7/+7 |
| | |||||
* | vici: Make hardware offload configurable | Tobias Brunner | 2017-05-23 | 1 | -0/+11 |
| | |||||
* | child-sa: Optionally enable hardware offload for CHILD_SAs | Tobias Brunner | 2017-05-23 | 1 | -0/+1 |
| | |||||
* | child-cfg: Add flag to enable hardware offload | Tobias Brunner | 2017-05-23 | 1 | -0/+3 |
| | |||||
* | child-cfg: Use flags for boolean options | Tobias Brunner | 2017-05-23 | 11 | -152/+128 |
| | | | | Makes it potentially easier to add new flags. | ||||
* | kernel-netlink: Enable hardware offloading if configured for an SA | Tobias Brunner | 2017-05-23 | 1 | -0/+25 |
| | |||||
* | kernel-ipsec: Add flag to enable hardware offloading for an IPsec SA | Tobias Brunner | 2017-05-23 | 1 | -0/+2 |
| |