Commit Graph
1108 Commits
Author SHA1 Message Date
Martin Willi 6319ce63cf Enable RADIUS DAE listening if configured 2012-03-05 18:06:13 +01:00
Martin Willi 85932ad24e Added infrastructure to listen to RADIUS Dynamic Authorization Extension requests 2012-03-05 18:06:13 +01:00
Martin Willi 3a42c08904 Added Dynamic Authorization Extension RADIUS message codes 2012-03-05 18:06:13 +01:00
Martin Willi c61341a58f Set IKE_SA lifetime based on RADIUS Session-Timeout attribute 2012-03-05 18:06:13 +01:00
Martin Willi bdcf441703 Set hard timeouts when setting a lifetime 2012-03-05 18:06:13 +01:00
Martin Willi e9fcf1c6cc Fix IKE_SA timeout debug output on 64bit platforms 2012-03-05 18:06:13 +01:00
Tobias Brunner 686cfd4e34 Added support for untruncated MD5 and SHA1 HMACs in ESP as used in RFC 4595.
This requires a Linux kernel >= 2.6.33.
2012-02-27 14:31:19 +01:00
Martin Willi 3a2660f189 Encode IPv6 virtual IPs in a Framed-IPv6-Prefix attribute 2012-02-24 11:20:16 +01:00
Martin Willi d15ae70c8c Refactored construction of RADIUS accounting messages 2012-02-24 11:12:18 +01:00
Martin Willi d93f204ca5 Include port numbers in Calling-Station-Id, too 2012-02-24 10:49:29 +01:00
Martin Willi 802ed08dff Use large enough buffers for IPv6 addresses in Calling-Station-Id 2012-02-24 10:13:08 +01:00
Martin Willi 434cdbac09 Send client external address as Calling-Station-Id in RADIUS accounting 2012-02-24 10:05:23 +01:00
Tobias Brunner b96eb46d5c Some Doxygen fixes. 2012-02-07 11:20:46 +01:00
Martin Willi 32dc2b0243 Update usage for all children in RADIUS accounting just before sending Stop 2012-02-06 10:51:40 +01:00
Martin Willi e5747e7a83 Check if ClusterIP directory could be opened before enumerating it 2012-02-06 10:51:39 +01:00
Martin Willi 85dd6a8deb Trigger DPD not before IKE_SA state gets updated 2012-02-02 10:35:50 +01:00
Martin Willi 916cdca851 Don't retransmit, rekey, reauth or DPD check SAs when in PASSIVE state 2012-02-02 10:34:04 +01:00
Tobias Brunner 9ec66bc1a5 Added an option to load CA certificates without CA basic constraint.
Enabling this option treats all certificates in ipsec.d/cacerts and
ipsec.conf ca sections as CA certificates even if they do not contain a
CA basic constraint.
2012-02-01 14:34:52 +01:00
Martin Willi 0399edef71 Support RADIUS accounting messages containing Framed-IP and Inbound/Outbound-Octets 2012-01-30 19:16:49 +01:00
Martin Willi 8e5b4aa023 Open RADIUS accounting sockets to exchange accounting messages 2012-01-30 19:15:20 +01:00
Martin Willi a69aff5f17 Support signing of RADIUS accounting messages 2012-01-30 19:13:20 +01:00
Martin Willi 370de553f8 RADIUS message constructor accepts a message code parameter 2012-01-30 19:11:08 +01:00
Tobias Brunner f1ba06c1c6 Cache list of plugin names to further simplify its usage.
Also helpful for ipsec statusall to avoid having to enumerate plugins.
2012-01-19 12:37:42 +01:00
Tobias Brunner 576298a3ef Simplified logging of list of loaded plugins. 2012-01-19 11:56:03 +01:00
Thomas Egerer d68b8dfec4 Destroy active task list before queued tasks
Since active task's destruction might result in adopting tasks from a
rekeyed ike sa it seems better to first destroy the active task list and
then destroy all queued tasks. This way adoption is possible at all,
while otherwise the queued task list would be empty.
2012-01-18 10:06:54 +01:00
Tobias Brunner 2e0b478a01 Android 4 requires LOCAL_MODULE_TAGS to be set for all modules.
Because all packages are now marked as optional executables that are to
be installed on the final system have to be added to PRODUCT_PACKAGES in
build/target/product/core.mk.  Dependencies (such as libraries) are
installed automatically.
2012-01-12 19:18:35 +01:00
Tobias Brunner 35a1986142 Fixed additional typos in comments and log messages. 2012-01-12 11:42:42 +01:00
Martin Willi 6a5c86b7ad Implemented TLS session resumption both as client and as server 2011-12-31 13:14:49 +01:00
Tobias Brunner 7c0c2349a9 Make number of concurrently handled stroke messages configurable. 2011-12-29 18:41:39 +01:00
Tobias Brunner 8ff513a863 Limit the number of concurrently handled stroke messages.
This avoids clogging the thread pool with potentially blocking jobs.
2011-12-29 18:39:34 +01:00
Tobias Brunner fc726f1359 Fix deadlock in trap_manager_t during acquire.
Also fixes a TOCTOU issue regarding the use of entry_t.pending.

The deadlock was caused because the rwlock was being locked while
waiting for an IKE_SA. Triggering the deadlock was a bit tricky, here
is the description by Thomas Egerer (the reporter of this issue):

"
The deadlock occurs when the following happens (in the given order):

a) an IKE_SA is built and a thread is processing the IKE_AUTH request,
   which can take a bit longer when a smartcard is involved. This
   causes the ike_sa_manager to lock a particular IKE_SA exclusively.
b) an acquire is triggered which causes the rwlock in the trap_manager
   to be read-locked, the subsequent call to
   ike_sa_manager->checkout_by_config has to wait until a) unlocks
   it's ike_sa.
c) a child_cfg contained in the peer_cfg belonging to the ike_sa
   a) has locked is routed causes the child_configs contained
   in the peer config to be locked by c) while the actual routing
   code within trap_manager tries to writelock it's rwlock.

That's about it. As soon as a) finishes authentication of the peer
and tries to find a matching child sa it will try to lock the child
configs of the peer config which is not possible since it has been
locked by c).

Thread | Resource locked                | Resource desired
-------+--------------------------------+--------------------------------
  (a)  | ike_sa in ike_sa_manager       | child_cfgs of peer_cfg
       |                                |
  (b)  | rwlock in trap-manager (read)  | ike_sa in ike_sa_manager
       |                                |
  (c)  | child_cfgs of peer_cfg         | rwlock in trap-manager (write)
"

With this patch thread (b) now does not hold the lock while waiting for
the IKE_SA. Thus (c) can get the write lock, and (a) can subsequently
lock the mutex in the peer_cfg which then finally allows (b) to checkout
the IKE_SA.
2011-12-23 11:07:14 +01:00
Tobias Brunner d6656f11e4 Fixed flush() method of trap_manager_t.
A segmentation fault could have happened during destruction of the trap
manager after calling flush().
2011-12-23 10:38:10 +01:00
Tobias Brunner a5951a2861 Make sure the certificate cache is flushed when plugins are unloaded.
This avoids segmentation faults when plugins implementing cert_t are
already unloaded when the cache is flushed during destruction.
2011-12-15 12:20:09 +01:00
Tobias Brunner 3eff54a5ca Added missing libsimaka files to Android.mk. 2011-12-14 16:38:30 +01:00
Tobias Brunner 406c5a593b Destroy mediation managers before unloading plugins. 2011-12-14 14:24:37 +01:00
Andreas Steffen 54f53f9081 implemented IMC/IMV ReceiveMessageLong functions 2011-12-09 23:32:30 +01:00
Andreas Steffen ac3331e1cd added IMC/IMV support for send_message_long() and reserve_additional_id() functions 2011-12-09 17:11:31 +01:00
Andreas Steffen 170f918596 implemented IF-IMC/IMV 1.3 attributes 2011-12-08 17:57:39 +01:00
Andreas Steffen d6c892169c added TNC_TNCC_GetAttribute() and TNC_TNCC_SetAttribute() functions 2011-12-08 14:52:08 +01:00
Andreas Steffen 584282d7c9 added TNC_IMC_ReceiveMessageLong() and TNC_IMV_ReceiveMessageLong() support 2011-12-08 12:38:45 +01:00
Andreas Steffen 115d49a748 fixed typo in function name 2011-12-08 12:30:57 +01:00
Andreas Steffen aae76e9ba0 added TNC_TNCS_ReserveAdditionalIMVID() function 2011-12-07 17:55:26 +01:00
Andreas Steffen 194b23bb6e return with TNC_RESULT_SUCCESS 2011-12-07 17:36:04 +01:00
Andreas Steffen 80ca4e50c9 added TNC_TNCC_ReserveAdditionalIMCID() function 2011-12-07 17:31:49 +01:00
Andreas Steffen dcb5c5906e added TNC_TNCC_SendMessageLong() and TNC_TNCS_SendMessageLong() functions 2011-12-07 11:44:29 +01:00
Andreas Steffen f77505b8c8 corrected function name in error message 2011-12-07 00:12:15 +01:00
Andreas Steffen 10b9d52400 added TNC_TNCC_ReportMessageTypesLong() and TNC_TNCS_ReportMessageTypesLong() messages 2011-12-06 23:39:01 +01:00
Andreas Steffen db183a92b7 upgraded IF-IMC/IMV inteface definitions to version 1.3 2011-12-04 12:48:30 +01:00
Sansar Choinyambuu a66719d7d6 Reversed unintended commit 2011-11-28 21:17:16 +01:00
Sansar Choinyambuu 824ace105a Changed the static function name in openssl_rsa_public_key object
Removed unused chunk variable from PTS verify_quote_signature function
2011-11-28 21:17:16 +01:00