Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | child-rekey: Add method to check for the redundant SA created in a collision | Tobias Brunner | 2016-06-17 | 2 | -18/+37 | |
| | ||||||
* | unit-tests: Test for rekeying if INVALID_KE_PAYLOAD notifies are received | Tobias Brunner | 2016-06-17 | 1 | -0/+253 | |
| | ||||||
* | child-rekey: Don't change state to INSTALLED if it was already REKEYING | Tobias Brunner | 2016-06-17 | 1 | -3/+5 | |
| | | | | | This happens if there is a rekey collision and the peers disagree on the DH group. | |||||
* | unit-tests: Make IKE and ESP proposals configurable | Tobias Brunner | 2016-06-17 | 4 | -44/+116 | |
| | ||||||
* | unit-tests: Add tests for CHILD_SA rekeying/deletion collisions | Tobias Brunner | 2016-06-17 | 1 | -1/+288 | |
| | ||||||
* | unit-tests: Add asserts against job scheduling | Tobias Brunner | 2016-06-17 | 2 | -0/+60 | |
| | ||||||
* | ikev2: Use CHILD_REKEYED for replaced CHILD_SAs after rekeying | Tobias Brunner | 2016-06-17 | 3 | -15/+17 | |
| | | | | This allows handling collisions better, in particular with deletions. | |||||
* | unit-tests: Add asserts against task queues of IKE_SAs | Tobias Brunner | 2016-06-17 | 1 | -0/+32 | |
| | ||||||
* | child-rekey: Use more appropriate error notifies if CHILD_SA is not found or ↵ | Tobias Brunner | 2016-06-17 | 1 | -3/+8 | |
| | | | | | | getting deleted These are the notifies we should return according to RFC 7296. | |||||
* | child-rekey: Recreate the CHILD_SA if we receive a CHILD_SA_NOT_FOUND notify | Tobias Brunner | 2016-06-17 | 1 | -0/+28 | |
| | ||||||
* | child-create: Handle TEMPORARY_FAILURE notify as failure | Tobias Brunner | 2016-06-17 | 2 | -4/+5 | |
| | | | | | We will later add code to retry creating the CHILD_SA if we are not rekeying. Rekeying is already rescheduled as with any other errors. | |||||
* | unit-tests: Add unit tests for basic CHILD_SA rekeying | Tobias Brunner | 2016-06-17 | 3 | -0/+237 | |
| | ||||||
* | unit-tests: Add asserts against ike|child_rekey hooks | Tobias Brunner | 2016-06-17 | 2 | -0/+82 | |
| | ||||||
* | unit-tests: Match in and outbound SPIs in SA asserts | Tobias Brunner | 2016-06-17 | 1 | -2/+15 | |
| | | | | Since we use unique sequential SPIs that should be OK. | |||||
* | unit-tests: Register nonce generator and make first nonce byte configurable | Tobias Brunner | 2016-06-17 | 2 | -1/+19 | |
| | ||||||
* | unit-tests: Add mock nonce generator | Tobias Brunner | 2016-06-17 | 3 | -0/+129 | |
| | | | | | We don't make the full nonces configurable but only the first byte, which should be enough to force a nonce to be smaller than others. | |||||
* | unit-tests: Make message asserts more flexible | Tobias Brunner | 2016-06-17 | 2 | -26/+106 | |
| | ||||||
* | unit-tests: Add another CHILD_SA delete collision | Tobias Brunner | 2016-06-17 | 1 | -1/+56 | |
| | ||||||
* | unit-tests: Register mock DH implementation as static plugin feature | Tobias Brunner | 2016-06-17 | 1 | -0/+11 | |
| | ||||||
* | unit-tests: Add mock DH implementation that's basically a noop | Tobias Brunner | 2016-06-17 | 3 | -0/+125 | |
| | | | | | If the openssl plugin is built DH isn't that much of an overhead as ecp256 is used, but the default MODP group is now modp3072. | |||||
* | unit-tests: Make IKE SPIs predictable | Tobias Brunner | 2016-06-17 | 1 | -0/+14 | |
| | ||||||
* | unit-tests: Call methods on IKE_SAs in their context | Tobias Brunner | 2016-06-17 | 3 | -9/+18 | |
| | ||||||
* | unit-tests: Add a unit test for CHILD_SA DELETE collisions | Tobias Brunner | 2016-06-17 | 3 | -0/+149 | |
| | ||||||
* | child-delete: Remove unnecessary call to destroy_child_sa() | Tobias Brunner | 2016-06-17 | 1 | -2/+0 | |
| | | | | | | | | | | | | Generally, we will not find the CHILD_SA by searching for it with the outbound SPI (the initiator of the DELETE sent its inbound SPI) - and if we found a CHILD_SA it would most likely be the wrong one (one in which we used the same inbound SPI as the peer used for the one it deletes). And we don't actually want to destroy the CHILD_SA at this point as we know we already initiated a DELETE ourselves, which means that task still has a reference to it and will destroy the CHILD_SA when it receives the response from the other peer. | |||||
* | unit-tests: Add asserts against hooks on listener_t and messages captured there | Tobias Brunner | 2016-06-17 | 3 | -0/+364 | |
| | ||||||
* | unit-tests: Add asserts against SAs (e.g. their states) | Tobias Brunner | 2016-06-17 | 2 | -0/+56 | |
| | ||||||
* | unit-tests: Add separate test runner to test IKEv2 exchanges | Tobias Brunner | 2016-06-17 | 3 | -4/+100 | |
| | | | | This allows proper initialization of the daemon and the helper object. | |||||
* | unit-tests: Add helper class/object to test IKE exchanges | Tobias Brunner | 2016-06-17 | 3 | -0/+331 | |
| | ||||||
* | unit-tests: Add mock kernel_ipsec_t implementation for unit tests | Tobias Brunner | 2016-06-17 | 3 | -0/+165 | |
| | | | | Provides predictable sequential SPIs. | |||||
* | unit-tests: Add mock sender_t implementation for unit testing | Tobias Brunner | 2016-06-17 | 4 | -0/+153 | |
| | | | | | This allows to retrieve packets sent by an IKE_SA and pass it to another IKE_SA directly via process_message(). | |||||
* | unit-tests: Don't unload plugins before calling libcharon_deinit() | Tobias Brunner | 2016-06-17 | 1 | -3/+0 | |
| | | | | | | | libcharon_deinit() already calls all the functions we called manually. Unloading the plugins will not work if charon->initialize() is called as charon's static plugin features would already be unloaded before the destroyed members are accessed in destroy() to flush them. | |||||
* | kernel-netlink: Don't set replay window for outbound SAs | Tobias Brunner | 2016-06-17 | 1 | -0/+6 | |
| | | | | | It's not necessary and might waste memory. However, if ESN is used we set the window to 1 as the kernel rejects the attribute otherwise. | |||||
* | kernel-pfkey: Only set the replay window for inbound SAs | Tobias Brunner | 2016-06-17 | 1 | -3/+8 | |
| | | | | | It is not necessary for outbound SAs and might waste memory when large window sizes are used. | |||||
* | daemon: Don't hold settings lock while executing start/stop scripts | Tobias Brunner | 2016-06-17 | 1 | -20/+43 | |
| | | | | | | | If a called script interacts with the daemon or one of its plugins another thread might have to acquire the write lock (e.g. to configure a fallback or set a value). Holding the read lock prevents that, potentially resulting in a deadlock. | |||||
* | quick-mode: Fix reporting lifebytes if lifetime is configured | Tobias Brunner | 2016-06-17 | 1 | -2/+2 | |
| | ||||||
* | load-tester: Fix load-tester on platforms where plain `char` is signed | Tobias Brunner | 2016-06-17 | 1 | -1/+1 | |
| | | | | | | | | fgetc() returns an int and EOF is usually -1 so when this gets casted to a char the result depends on whether `char` means `signed char` or `unsigned char` (the C standard does not specify it). If it is unsigned then its value is 0xff so the comparison with EOF will fail as that is an implicit signed int. | |||||
* | configure: Check for and explicitly link against -latomic | Martin Willi | 2016-06-14 | 1 | -1/+1 | |
| | | | | | Some C libraries, such as uClibc, require an explicit link for some atomic functions. Check for any libatomic, and explcily link it. | |||||
* | resolve: Add refcounting for installed DNS servers | Tobias Brunner | 2016-06-10 | 1 | -27/+99 | |
| | | | | | | This fixes DNS server installation if make-before-break reauthentication is used as there the new SA and DNS server is installed before it then is removed again when the old IKE_SA is torn down. | |||||
* | resolve: Use process abstraction when calling resolvconf | Tobias Brunner | 2016-06-10 | 1 | -18/+60 | |
| | | | | This allows us to capture output written to stderr/stdout. | |||||
* | resolve: Make sure to clean up if calling resolvconf failed | Tobias Brunner | 2016-06-10 | 1 | -3/+4 | |
| | | | | | | If running resolvconf fails handle() fails release() is not called, which might leave an interface file on the system (or depending on which script called by resolvconf actually failed even the installed DNS server). | |||||
* | kernel-pfroute: Return interface to reach destination from get_nexthop() | Tobias Brunner | 2016-06-10 | 1 | -4/+13 | |
| | ||||||
* | kernel-pfkey: Install routes with OUT policies | Tobias Brunner | 2016-06-10 | 1 | -31/+30 | |
| | ||||||
* | kernel-netlink: Install routes with OUT policies | Tobias Brunner | 2016-06-10 | 1 | -25/+24 | |
| | | | | | This is the direction we actually need routes in and makes the code easier to read. | |||||
* | kernel-pfkey: Don't install routes for drop policies and if protocol/ports ↵ | Tobias Brunner | 2016-06-10 | 1 | -3/+10 | |
| | | | | are in the selector | |||||
* | kernel-netlink: Don't install routes for drop policies and if protocol/ports ↵ | Tobias Brunner | 2016-06-10 | 1 | -96/+106 | |
| | | | | | | | | | are in the selector We don't need them for drop policies and they might even mess with other routes we install. Routes for policies with protocol/ports in the selector will always be too broad and might conflict with other routes we install. | |||||
* | kernel-pfkey: Also use interface returned by get_nexthop() for IPsec policies | Tobias Brunner | 2016-06-10 | 1 | -1/+3 | |
| | | | | | An exception is if the local address is virtual, in which case we want the route to be via TUN device. | |||||
* | kernel-netlink: Also use interface returned by get_nexthop() for IPsec policies | Tobias Brunner | 2016-06-10 | 1 | -1/+2 | |
| | ||||||
* | kernel-pfkey: Use interface to next hop for shunt policies | Tobias Brunner | 2016-06-10 | 1 | -2/+3 | |
| | ||||||
* | kernel-netlink: Use interface to next hop for shunt policies | Tobias Brunner | 2016-06-10 | 1 | -10/+13 | |
| | | | | | | Using the source address to determine the interface is not correct for net-to-net shunts between two interfaces on which the host has IP addresses for each subnet. | |||||
* | kernel-netlink: Return outbound interface in get_nexthop() | Tobias Brunner | 2016-06-10 | 1 | -5/+43 | |
| |