aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra
Commit message (Collapse)AuthorAgeFilesLines
...
* kernel-interface: Add a flag to indicate no policy updates requiredMartin Willi2014-06-041-0/+2
|
* plugins: Don't link with -rdynamic on WindowsMartin Willi2014-06-047-7/+7
|
* windows: Link libhydra against Winsock2Martin Willi2014-06-041-0/+4
|
* pfkey: Always include stdint.hTobias Brunner2014-05-191-1/+1
| | | | | | On some systems (e.g. on Debian/kFreeBSD) that header is required when including ipsec.h, on Linux we require it too when including pfkeyv2.h, so to simplify things we just always include it.
* enum: Don't directly include enum.hMartin Willi2014-05-161-1/+1
| | | | | To allow enum.h to depend on utils.h definitions, avoid its direct inclusion. Instead include utils.h, which includes enum.h as well.
* kernel-klips: Pass a pointer to a properly sized integer for algorithm lookupMartin Willi2014-05-161-1/+1
|
* kernel-pfkey: Added IPComp supportFrancois ten Krooden2014-04-241-19/+138
| | | | | | - get_cpi function was implemented to retrieve a CPI from the kernel. - add_sa/update_sa/del_sa were updated to accommodate for IPComp SA. - Updated add_policy_internal to update the SPD to support IPComp.
* attr: Don't shift the 32-bit netmask by 32Tobias Brunner2014-04-091-3/+6
| | | | | | | | | | This is undefined behavior as per the C99 standard (sentence 1185): "If the value of the right operand is negative or is greater or equal to the width of the promoted left operand, the behavior is undefined." Apparently shifts may be done modulo the width on some platforms so a shift by 32 would not shift at all.
* kernel-pfroute: Let get_nexthop() default to destination addressTobias Brunner2014-03-311-3/+7
|
* attr: Silently skip over load optionTobias Brunner2014-02-121-0/+4
|
* libhydra: Remove unused hydra->daemonTobias Brunner2014-02-122-13/+3
|
* libhydra: Use lib->ns instead of hydra->daemonTobias Brunner2014-02-129-29/+29
|
* attr-sql: Use namespace for attr-sql config, with fallbackTobias Brunner2014-02-122-2/+4
|
* kernel-pfroute: Don't cache route entries if installation failsTobias Brunner2014-02-121-2/+5
|
* kernel-netlink: Don't cache route entries if installation failsTobias Brunner2014-02-121-2/+5
| | | | Fixes #500.
* kernel-netlink: Set selector on transport mode IPComp SAsTobias Brunner2014-01-231-1/+1
|
* kernel-netlink: Selectively add selector on SAs that use IPCompTobias Brunner2014-01-231-1/+7
| | | | | | Don't add a selector to tunnel mode SAs, these might serve multiple traffic selectors but with only one selector on the SA only the traffic matching the first one would actually get tunneled.
* kernel-netlink: Enable TFC padding only for tunnel mode ESP SAsTobias Brunner2013-11-191-2/+2
| | | | | | | The kernel does not allow them for transport mode SAs or IPComp SAs (and of course not for AH SAs). Fixes #446.
* android: Remove dependency on libvstrTobias Brunner2013-11-131-1/+0
|
* kernel-netlink: Check existence of linux/fib_rules.h, don't include it in ↵Tobias Brunner2013-10-181-1/+8
| | | | | | distribution This reverts commit b0761f1f0a5abd225edc291c8285f99a538e6a66.
* kernel-pfkey: Install ICMP[v6] type/code as expected by the Linux kernelTobias Brunner2013-10-171-19/+52
|
* kernel-netlink: Convert ports in acquires to ICMP[v6] type and codeTobias Brunner2013-10-171-3/+8
|
* kernel-netlink: Properly install policies with ICMP[v6] types and codesTobias Brunner2013-10-171-1/+12
|
* kernel-netlink: Allow setting firewall marks on routing ruleTobias Brunner2013-10-111-0/+20
|
* attr-sql: Use a serializable transaction when inserting identitiesTobias Brunner2013-10-111-12/+5
|
* pool: Move the pool utility to its own directory in srcTobias Brunner2013-10-117-2232/+1
|
* attr-sql: Handle concurrent insertion of identitiesTobias Brunner2013-10-111-2/+12
| | | | | | | | | If the same identity is added concurrently by two threads (or by the pool utility) INSERT might fail even though the SELECT was unsuccessful before. We are currently not able to lock the identities table in a portable way (something like SELECT ... FOR UPDATE on MySQL).
* attr-sql: Don't use database transactions in create_attribute_enumeratorTobias Brunner2013-10-111-5/+0
| | | | | | | | | There could, of course, be race conditions when enumerating the attributes, but those probably don't matter (e.g. missing an attribute that was concurrently added). Transactions are more intended to revert multiple changes if anything fails in the process.
* kernel: Use a time_t to report use time in query_policy()Martin Willi2013-10-116-7/+7
|
* kernel: Use a time_t to report use time in query_sa()Martin Willi2013-10-116-8/+8
|
* kernel-netlink: Allow to override xfrm_acq_expires valueAnsis Atteka2013-09-231-6/+10
| | | | | | | | | | | | | | | | When using auto=route, current xfrm_acq_expires default value implies that tunnel can be down for up to 165 seconds, if other peer rejected first IKE request with an AUTH_FAILED or NO_PROPOSAL_CHOSEN error message. These error messages are completely normal in setups where another application pushes configuration to both strongSwans without waiting for acknowledgment that they have updated their configurations. This patch allows strongswan to override xfrm_acq_expires default value by setting charon.plugins.kernel-netlink.xfrm_acq_expires in strongswan.conf. Signed-off-by: Ansis Atteka <aatteka@nicira.com>
* resolve: Remove comment when using resolvconf(8)Tobias Brunner2013-09-131-2/+1
| | | | | | | | | | | Since comments in resolv.conf are only valid at the beginning of a line resolvconf(8) seems to have started treating any text after 'nameserver <ip>' as additional IP addresses for name servers. Since it ignores comments, and we can easily remove the added servers again, there is no point to add any. Fixes #410.
* Build all shared libraries with -no-undefined and link them properlyTobias Brunner2013-09-121-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.
* kernel-netlink: increase buffer size for RT netlink messagesAnsis Atteka2013-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | Commit 940e1b0f66dc04b0853414c1f4c45fa3f6e33bdd "Filter ignored interfaces in kernel interfaces (for events, address enumeration, etc.)" made charon to ignore routes with unusable interfaces. Unusable interface is one where charon has not seen RTM_NEWLINK message from the kernel. Sometime RTM_NEWLINK message can be 1048 bytes large. This is 24 bytes more than currently allocated buffer of 1024 bytes. If kernel sends such a large message, then it would be silently ignored by charon and corresponding interface would never become usable. Hence strongSwan might resolve invalid source IP address in get_route() function. This would prevent IPsec tunnel to be established. To reproduce create a VLAN interface with following command: vconfig add eth1 12
* attributes: shorten some Unity and XAuth attribute short namesMartin Willi2013-09-031-15/+15
|
* kernel-pfroute: Fix mixed up memset() call in get_route()Mathias Krause2013-08-291-1/+1
| | | | | | | | | | The retry code introduced in dc8b083 got the memset() arguments wrong. Fix this to ensure the buffer gets zeroed, for real. It probably doesn't matter as we do reset the message length on retry, so the stale data shouldn't be seen by anyone. Found-by: git grep 'memset\s*\([^,]*,\s*[^,]*,\s*0\s*\)'
* kernel: Restore enumeration of all addresses when searching for address in TSTobias Brunner2013-08-211-3/+6
| | | | | | | | | Since f52cf07532 addresses on ignored, down or loopback interfaces were not considered as valid addresses anymore when searching for an address contained in the local traffic selector. This meant that route installation failed, for instance, if charon.install_virtual_ip_on was set to 'lo', or, on gateways, if internal interfaces were ignored with the charon.interfaces_* options.
* kernel-netlink: Fix calculation of ESN bitmap lengthTobias Brunner2013-08-211-4/+12
| | | | | While bmp_len stores the number of u_int32_t the allocated bitmap actually consists of those integers.
* kernel-netlink,pfroute: Properly update address flag within ROAM_DELAYTobias Brunner2013-08-122-2/+2
| | | | | | | 77d4a02 and 55da01f only updated the address flag when a job was created, which obviously had the same limitation as the old code. Fixes #374.
* kernel-pfroute: Implement roam event handling like in the kernel-netlink pluginTobias Brunner2013-08-121-13/+36
| | | | | There was no proper locking and the issue regarding the address flag also existed.
* kernel-netlink: Ensure address changes are not missed in roam eventsTobias Brunner2013-08-121-4/+15
| | | | | | | | | | | | | | | | If multiple roam events are triggered within ROAM_DELAY, only one job is created. The old code set the address flag to the value of the last triggering call. So if a route change followed an address change within ROAM_DELAY the address change was missed by the upper layers, e.g. causing it not to update the list of addresses via MOBIKE. The new code now keeps the state of the address flag until the job is actually executed, which still has some issues. For instance, if an address disappears and reappears within ROAM_RELAY, the flag would not have to be set to TRUE. So address updates might occasionally get triggered where none would actually be required. Fixes #374.
* mem-pool: add option for reusing online leases, and disable it by defaultMartin Willi2013-07-291-1/+13
| | | | | | | | | | | Mainly for reauthentication with third party implementations, we allowed to reuse an online lease, but only for the same peer identity and when it explicitly requested the same address. This has always been problematic, because it changes the reqid of the CHILD_SA with the same traffic selectors, breaking the old tunnel. As we now reject such policy overwrites, this usually lets the installation of the new policies fail. We therefore disable reassignment of online leases by default.
* mem-pool: replace per-identity online/offline lists by more efficient arraysMartin Willi2013-07-291-48/+52
| | | | This saves two lists per connected peer identity, up to 0.4KB.
* mem-pool: refcount online lease when reassigning it to another tunnelMartin Willi2013-07-261-5/+28
| | | | | | | When we reassign an online lease for the same peer, we have to refcount it. Otherwise we would set it offline if one of the tunnels goes down, but it is actually still in use by a the second tunnel. This can finally lead in assigning the same virtual IP to different peers.
* kernel-pfkey: Add sanity check when deleting policiesTobias Brunner2013-07-241-0/+5
|
* Fix various API doc issues and typosTobias Brunner2013-07-182-7/+7
| | | | Partially based on an old patch by Adrian-Ken Rueegsegger.
* kernel-pfroute: use watcher to receive kernel eventsMartin Willi2013-07-181-17/+13
|
* kernel-pfkey: use watcher to receive networking eventsMartin Willi2013-07-181-19/+13
|
* kernel-netlink: use watcher to receive kernel events for net/ipsecMartin Willi2013-07-182-35/+24
|
* kernel-pfkey: Fail route installation if remote TS matches peerTobias Brunner2013-07-181-0/+8
|