Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | libipsec: Make sure to expire the right SA | Tobias Brunner | 2017-09-18 | 1 | -2/+9 |
| | | | | | | | | | | | | | | If an IPsec SA is actually replaced with a rekeying its entry in the manager is freed. That means that when the hard expire is triggered a new entry might be found at the cached pointer location. So we have to make sure we trigger the expire only if we found the right SA. We could use SPI and addresses for the lookup, but this here requires a bit less memory and is just a small change. Another option would be to somehow cancel the queued job, but our scheduler doesn't allow that at the moment. Fixes #2399. | ||||
* | ip-packet: Correctly determine protocol in fragmented IPv6 packets | Tobias Brunner | 2017-09-18 | 1 | -6/+57 |
| | | | | | | We don't attempt to parse the transport headers for fragments, not even for the initial fragment (it's not guaranteed they contain the header, depending on the number and type of extension headers). | ||||
* | ip-packet: Fix "packet too short" error when parsing fragmented IPv4 packets | Tobias Brunner | 2017-09-18 | 1 | -1/+6 |
| | | | | | Only attempt to parse the transport header of an IPv4 packet if it's not fragmented or the first fragment. | ||||
* | linked-list: Change return value of find_first() and signature of its callback | Tobias Brunner | 2017-05-26 | 1 | -37/+54 |
| | | | | This avoids the unportable five pointer hack. | ||||
* | libipsec: Enforce a minimum of 256 for SPIs | Tobias Brunner | 2017-03-02 | 1 | -3/+4 |
| | | | | | | RFC 4303 reserves the SPIs between 1 and 255 for future use. This also avoids an overflow and a division by zero if spi_min is 0 and spi_max is 0xffffffff. | ||||
* | libipsec: Fix min/max SPI | Tobias Brunner | 2017-03-02 | 1 | -2/+2 |
| | |||||
* | kernel: Make range of SPIs for IPsec SAs configurable | Tobias Brunner | 2017-03-02 | 1 | -2/+14 |
| | |||||
* | libipsec: Log a packet's ports and protocol in case of a policy mismatch | Tobias Brunner | 2017-03-02 | 1 | -5/+7 |
| | |||||
* | libipsec: Match IPsec policies against ports of processed packets | Tobias Brunner | 2017-03-02 | 1 | -1/+21 |
| | | | | Fixes #2252. | ||||
* | libipsec: Add support for AES and Camellia in CCM mode | Tobias Brunner | 2017-01-25 | 1 | -3/+16 |
| | | | | Fixes #2172. | ||||
* | libipsec: Fix Windows build via MinGW | Tobias Brunner | 2017-01-25 | 3 | -0/+35 |
| | | | | Fixes #2118. | ||||
* | Use standard unsigned integer types | Andreas Steffen | 2016-03-24 | 19 | -158/+158 |
| | |||||
* | libipsec: Pass the same data to del_policy() as to add_policy() | Tobias Brunner | 2016-02-04 | 2 | -8/+12 |
| | | | | | | We already do this for the other kernel interfaces. Fixes e1e88d5adde0 ("libipsec: Don't attempt deletion of any non-IPsec policies") | ||||
* | libipsec: Don't attempt deletion of any non-IPsec policies | Tobias Brunner | 2016-02-04 | 1 | -1/+1 |
| | | | | | | | | An example are the fallback drop policies installed when updating SAs. We ignore such policies in add_policy() so there is no point in attempting to remove them. Since they use different priorities than regular policies this did not result in policies getting deleted unintentionally but there was an irritating log message on level 2 that indicated otherwise. | ||||
* | android: Fix build after updating Linux headers | Tobias Brunner | 2015-11-12 | 1 | -1/+0 |
| | | | | | | | | Since we don't use the kernel-netlink plugin anymore and the headers in the NDK are reasonably recent, we don't need this anymore (at least when building the app). Fixes #1172. | ||||
* | libipsec: Properly support CAMELLIA in CTR mode | Tobias Brunner | 2015-10-30 | 1 | -0/+1 |
| | |||||
* | libipsec: Fix crypter lookup for AES-CTR | Tobias Brunner | 2015-10-30 | 1 | -1/+12 |
| | | | | | | | | | | | | Due to the nonce, the ESP key material is four bytes longer than needed for the actual AES key. The crypto plugins, however, register their AES-CTR implementations with the AES key length, so the lookup here failed. For IKEv2 the key material is allocated after creating a crypter instance with the negotiated AES key size. The length of the actual key material is retrieved via get_key_size(), which adds the four bytes to the AES key length. Fixes #1124. | ||||
* | libipsec: Add a unit-test for ESP encryption using ChaCha20Poly1305 | Martin Willi | 2015-07-12 | 3 | -0/+139 |
| | |||||
* | libipsec: Add a unit-test test runner | Martin Willi | 2015-07-12 | 5 | -8/+93 |
| | |||||
* | libipsec: Create AEAD with four byte salt for ChaCha20-Poly1305 | Martin Willi | 2015-06-29 | 1 | -0/+1 |
| | |||||
* | libipsec: Insert SAs first, so latest SA with the same reqid gets used | Tobias Brunner | 2015-05-21 | 1 | -1/+1 |
| | | | | | This was useful for testing purposes of RADIUS accounting, but OS kernels generally will use the latest SA, so we do the same. | ||||
* | aead: Create AEAD using traditional transforms with an explicit IV generator | Martin Willi | 2015-04-13 | 1 | -1/+8 |
| | | | | | | Real AEADs directly provide a suitable IV generator, but traditional crypters do not. For some (stream) ciphers, we should use sequential IVs, for which we pass an appropriate generator to the AEAD wrapper. | ||||
* | libipsec: Pass separate inbound/update flags to the IPsec SA manager | Martin Willi | 2015-03-09 | 2 | -3/+5 |
| | | | | | Similar to other kernel interfaces, the libipsec backends uses the flag for different purposes, and therefore should get separate flags. | ||||
* | kernel-interface: Raise expires with a proto/SPI/dst tuple instead of reqid | Martin Willi | 2015-02-20 | 4 | -22/+32 |
| | |||||
* | libipsec: Remove unused src/dst_ts parameters from ipsec_sa_mgr_t.add_sa() | Martin Willi | 2015-02-20 | 4 | -14/+5 |
| | |||||
* | libipsec: Remove unused reqid parameter from ipsec_sa_mgr_t.get_spi() | Martin Willi | 2015-02-19 | 2 | -7/+4 |
| | |||||
* | ip-packet: Fix length in IPv6 header of generated packets | Tobias Brunner | 2014-10-20 | 1 | -1/+1 |
| | |||||
* | ip-packet: Fix removal of TFC padding for IPv6 | Tobias Brunner | 2014-10-14 | 1 | -1/+1 |
| | | | | | | The IPv6 length field denotes the payload length after the 40 bytes header. Fixes: 293515f95cf5 ("libipsec: remove extra RFC4303 TFC padding appended to inner payload") | ||||
* | ip-packet: Define our own structs to handle TCP/UDP headers | Tobias Brunner | 2014-09-09 | 1 | -2/+27 |
| | |||||
* | ip_packet: Add function to easily encode UDP packets | Tobias Brunner | 2014-07-22 | 2 | -0/+29 |
| | |||||
* | ip_packet: Apply transport protocol ports when encoding IP packet | Tobias Brunner | 2014-07-22 | 2 | -10/+30 |
| | |||||
* | ip_packet: Add getter for IP payload | Tobias Brunner | 2014-07-22 | 2 | -5/+25 |
| | |||||
* | ip_packet: Allow creation of IP packets from data | Tobias Brunner | 2014-07-22 | 2 | -1/+164 |
| | |||||
* | ip_packet: Parse ports from TCP and UDP headers | Tobias Brunner | 2014-07-22 | 1 | -7/+63 |
| | |||||
* | libipsec: Add support for new policy priority class | Tobias Brunner | 2014-06-19 | 1 | -1/+4 |
| | |||||
* | libipsec: Avoid name clash with sched.h clone() | Martin Willi | 2014-06-04 | 2 | -4/+4 |
| | |||||
* | aead: Support custom AEAD salt sizes | Martin Willi | 2014-03-31 | 1 | -1/+2 |
| | | | | | | | | | The salt, or often called implicit nonce, varies between AEAD algorithms and their use in protocols. For IKE and ESP, GCM uses 4 bytes, while CCM uses 3 bytes. With TLS, however, AEAD mode uses 4 bytes for both GCM and CCM. Our GCM backends currently support 4 bytes and CCM 3 bytes only. This is fine until we go for CCM mode support in TLS, which requires 4 byte nonces. | ||||
* | android: Remove dependency on libvstr | Tobias Brunner | 2013-11-13 | 1 | -1/+0 |
| | |||||
* | libipsec: Don't print ciphertext with ICV in log message | Tobias Brunner | 2013-10-17 | 1 | -1/+2 |
| | |||||
* | libipsec: Properly calculate padding length especially for AES-GCM | Tobias Brunner | 2013-10-17 | 1 | -1/+3 |
| | |||||
* | iv_gen: Provide external sequence number (IKE, ESP) | Tobias Brunner | 2013-10-11 | 1 | -1/+1 |
| | | | | This prevents duplicate sequential IVs in case of a HA failover. | ||||
* | ipsec: Use IV generator to encrypt ESP messages | Tobias Brunner | 2013-10-11 | 2 | -9/+7 |
| | |||||
* | libipsec: Enforce byte/packet lifetimes on SAs | Martin Willi | 2013-10-11 | 3 | -7/+77 |
| | |||||
* | libipsec: remove extra RFC4303 TFC padding appended to inner payload | Martin Willi | 2013-10-11 | 1 | -0/+6 |
| | |||||
* | libipsec: Support usage statistics and query_sa() on IPsec SAs | Martin Willi | 2013-10-11 | 5 | -4/+102 |
| | |||||
* | libipsec: fix memory management when cloning ip_packet | Martin Willi | 2013-09-13 | 1 | -1/+1 |
| | |||||
* | libipsec: check for a policy with the reqid of the SA on decapsulation | Martin Willi | 2013-09-13 | 3 | -7/+14 |
| | | | | | To prevent a client from sending a packet with a source address of a different client, we require a policy bound via reqid to the decapsulating SA. | ||||
* | Build all shared libraries with -no-undefined and link them properly | Tobias Brunner | 2013-09-12 | 1 | -1/+5 |
| | | | | | | | | | | The flag is required to convince libtool on Cygwin to build DLLs. But on Windows these shared libraries can not have undefined symbols, so we have to link them explicitly to the libraries they reference. For plugins this is currently not done, so only the monolithic build is supported. The plugin loader wouldn't be able to load DLLs anyway, as it tries to load files that don't exist on Cygwin. | ||||
* | libipsec: Properly initialize variables when creating AEAD wrapper | Tobias Brunner | 2013-09-04 | 1 | -2/+2 |
| | |||||
* | libipsec: Don't limit traditional algorithms to AES and SHA1/2 | Tobias Brunner | 2013-08-12 | 1 | -25/+7 |
| | | | | Closes #377. |