aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/bus/bus.c
Commit message (Collapse)AuthorAgeFilesLines
* linked-list: Change return value of find_first() and signature of its callbackTobias Brunner2017-05-261-10/+10
| | | | This avoids the unportable five pointer hack.
* linked-list: Change interface of callback for invoke_function()Tobias Brunner2017-05-261-11/+12
| | | | This avoids the unportable five pointer hack.
* bus: Re-add ampersand that got lost in refactoringTobias Brunner2016-11-141-1/+1
| | | | | Fixes: 4af02c6c61cf ("bus: Fix maximum log level for different groups after removal of a logger")
* bus: Fix maximum log level for different groups after removal of a loggerTobias Brunner2016-11-111-5/+5
| | | | | | | The log level was incorrectly set to the same value for all groups. Fixes: dac15e03c828 ("bus: Fix maximum log levels when mixing log/vlog implementing loggers")
* bus: Add new hooks for derived IKE_SA and CHILD_SA keysTobias Brunner2016-10-041-1/+68
|
* bus: Fix maximum log levels when mixing log/vlog implementing loggersTobias Brunner2016-09-301-12/+20
| | | | | | | | | | | The maximum would not get set correctly when a logger is removed and the first remaining logger in the list (the one with the highest log level) does e.g. only implement vlog() while there are other loggers that implement log(). This would result in only max_vlevel getting set correctly while max_level would incorrectly get set to -1 so that log() would not get called for any of the loggers anymore. References #574.
* Use standard unsigned integer typesAndreas Steffen2016-03-241-1/+1
|
* bus: Add new hook called when IKEv1 CHILD_SAs are migrated to a new IKE_SATobias Brunner2015-05-211-1/+33
| | | | | | The interface is currently not very nice, but if we ever were able to safely checkout multiple SAs concurrently we could add something similar to ike_rekey() and call that when we detect a reauthentication.
* bus: Add an ike_update() hook invoked when peer endpoints changeMartin Willi2015-02-201-0/+28
|
* bus: Add ike_reestablish_pre hook, called before DNS resolutionTobias Brunner2014-07-221-4/+33
| | | | | The old hook is renamed to ike_reestablish_post and is now also called when the initiation of the new IKE_SA failed.
* bus: Properly va_copy() argument list before passing it to printf() functionsMartin Willi2014-06-191-1/+3
| | | | | | | | As we later potentially use args again, we can't consume it with printf functions without copying it first. Clone list before passing it to any consuming function. Fixes #621.
* bus: Add a handle_vips() hook invoked after handling configuration attributesMartin Willi2014-06-171-0/+28
| | | | | | | | | Similar to assign_vips() used by a peer assigning virtual IPs to the other peer, the handle_vips() hook gets invoked on a peers after receiving attributes. On release of the same attributes the hook gets invoked again. This is useful to inspect handled attributes, as the ike_updown() hook is invoked after authentication, when attributes have not been handled yet.
* bus: Add a fast-path if log messages don't have to be loggedTobias Brunner2014-04-241-7/+53
| | | | | | | For some rwlock_t implementations acquiring the read lock could be quite expensive even if there are no writers (e.g. because the implementation requires acquiring a mutex to check for writers) particularly if the lock is highly contended, like it is for the vlog() method.
* bus: raise certificate validation alerts using credential manager hookMartin Willi2013-07-181-0/+29
|
* Introduce an optional logger_t.vlog() method with format string and argumentsMartin Willi2013-05-061-13/+60
| | | | | | | To have more flexibility in the logging backend, receiving the original format string and do printf() substitution in the logger may be preferable. An additional but optional logger method does not touch the behavior of existing loggers.
* emit a single assig_vips bus message for all VIPsAndreas Steffen2013-04-061-6/+5
|
* ifmap plugin subscribes to assing_vip bus signalAndreas Steffen2013-04-061-0/+29
|
* Raise an alert if an authorize() hook failsMartin Willi2012-12-191-0/+4
|
* Fixed output of longer debug messagesTobias Brunner2012-11-071-0/+1
| | | | | (v)snprintf(3) returns the length without terminating null byte but the length given as parameter must include it.
* Add ike_reestablish() event that is triggered when an IKE_SA is reestablishedTobias Brunner2012-09-061-0/+28
| | | | | This is particularly useful during reauthentication to get the new IKE_SA.
* Log to a malloc()ed buffer if the on-stack buffer is not large enoughMartin Willi2012-07-131-3/+23
|
* Loggers specify what log messages they want to receive during registration.Tobias Brunner2012-05-021-29/+153
| | | | | | | This also allows us to generate the log message only once for all loggers that need it (avoids calls to custom printf specifier callbacks). To update the log levels loggers can simply be registered again.
* Use a separate interface for loggers.Tobias Brunner2012-05-021-190/+101
| | | | | | | | The new interface does not allow loggers to unregister themselves from the bus. This allows us to use a rwlock_t for them. The latter also means that loggers can now be called concurrently by multiple threads.
* Use a separate list and mutex for loggers.Tobias Brunner2012-05-021-69/+152
| | | | | | | | | | | This avoids deadlocks caused by extensive listener_t implementations which might want to acquire a lock which is currently held by another thread wanting to log messages. Since the latter requires that thread to acquire the same lock the initial thread currently holds this previously resulted in a deadlock. With this change logging messages does not require threads to acquire the main lock in bus_t and thus avoids the deadlock.
* Removed remaining parts of controller_t.listen() implementation.Tobias Brunner2012-05-021-39/+9
|
* Remove obsolete bus_t.listen() method.Tobias Brunner2012-05-021-59/+0
|
* Invoke bus_t.message hook twice, once plain and parsed, once encoded and ↵Martin Willi2012-03-201-2/+2
| | | | encrypted
* Pass IKEv1 specific keymat to ike_keys hookMartin Willi2012-03-201-3/+4
|
* Properly remove listener when listen() times outMartin Willi2011-08-311-0/+1
|
* bus->listen() and the controller wrappers accept a timeout to wait for callbacksMartin Willi2011-08-261-4/+26
|
* Replaced ike_sa_t.create_child_sa_iterator with enumerator.Tobias Brunner2011-07-061-4/+4
| | | | | This required two new methods on ike_sa_t. One returns the number of CHILD_SAs and one allows to remove a CHILD_SA.
* Fix potential use after freeThomas Egerer2011-01-191-1/+1
|
* Refer to scheduler and processor via lib and not hydra.Tobias Brunner2010-09-021-2/+1
|
* Refer to processor via hydra and not charon.Tobias Brunner2010-09-021-2/+2
|
* Pass the CREATE_CHILD_SA initiator flag to the child_keys parameterMartin Willi2010-07-261-3/+3
|
* Added a hook to narrow traffic selectors for CHILD_SAsMartin Willi2010-07-131-0/+33
|
* Moved bus_t to METHOD/INIT macrosMartin Willi2010-07-131-108/+69
|
* Move debug groups from charon's bus.h to libstrongswan's debug.h.Tobias Brunner2010-04-061-26/+0
|
* Moving charon to libcharon.Tobias Brunner2010-03-191-0/+753