aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/ha/ha_plugin.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-07-22 18:54:35 +0200
committerMartin Willi <martin@revosec.ch>2010-07-26 13:53:49 +0200
commitaa334daa9bf3f87b4c8f0565a6f56d67da651316 (patch)
treed946c9eac831bc404fe66d94aade2f67de209a18 /src/libcharon/plugins/ha/ha_plugin.c
parent2031002d426a94af3fc362053f36313f721c5489 (diff)
downloadstrongswan-aa334daa9bf3f87b4c8f0565a6f56d67da651316.tar.bz2
strongswan-aa334daa9bf3f87b4c8f0565a6f56d67da651316.tar.xz
Use a sync message cache to resynchronize IKE_SAs without rekeying
Diffstat (limited to 'src/libcharon/plugins/ha/ha_plugin.c')
-rw-r--r--src/libcharon/plugins/ha/ha_plugin.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/libcharon/plugins/ha/ha_plugin.c b/src/libcharon/plugins/ha/ha_plugin.c
index 70daca0bf..cfce45e47 100644
--- a/src/libcharon/plugins/ha/ha_plugin.c
+++ b/src/libcharon/plugins/ha/ha_plugin.c
@@ -21,6 +21,7 @@
#include "ha_dispatcher.h"
#include "ha_segments.h"
#include "ha_ctl.h"
+#include "ha_cache.h"
#include <daemon.h>
#include <config/child_cfg.h>
@@ -76,6 +77,11 @@ struct private_ha_plugin_t {
* Segment control interface via FIFO
*/
ha_ctl_t *ctl;
+
+ /**
+ * Message cache for resynchronization
+ */
+ ha_cache_t *cache;
};
METHOD(plugin_t, destroy, void,
@@ -88,6 +94,7 @@ METHOD(plugin_t, destroy, void,
this->ike->destroy(this->ike);
this->child->destroy(this->child);
this->dispatcher->destroy(this->dispatcher);
+ this->cache->destroy(this->cache);
this->segments->destroy(this->segments);
this->kernel->destroy(this->kernel);
this->socket->destroy(this->socket);
@@ -142,14 +149,16 @@ plugin_t *ha_plugin_create()
}
this->kernel = ha_kernel_create(count);
this->segments = ha_segments_create(this->socket, this->kernel, this->tunnel,
- count, strcmp(local, remote) > 0, monitor, resync);
+ count, strcmp(local, remote) > 0, monitor);
+ this->cache = ha_cache_create(this->kernel, this->socket, resync, count);
if (fifo)
{
- this->ctl = ha_ctl_create(this->segments);
+ this->ctl = ha_ctl_create(this->segments, this->cache);
}
- this->dispatcher = ha_dispatcher_create(this->socket, this->segments);
- this->ike = ha_ike_create(this->socket, this->tunnel);
- this->child = ha_child_create(this->socket, this->tunnel);
+ this->dispatcher = ha_dispatcher_create(this->socket, this->segments,
+ this->cache);
+ this->ike = ha_ike_create(this->socket, this->tunnel, this->cache);
+ this->child = ha_child_create(this->socket, this->tunnel, this->cache);
charon->bus->add_listener(charon->bus, &this->segments->listener);
charon->bus->add_listener(charon->bus, &this->ike->listener);
charon->bus->add_listener(charon->bus, &this->child->listener);