updated HA sync plugin to new lifetime config

This commit is contained in:
Martin Willi 2009-09-10 14:42:17 +02:00 committed by Martin Willi
parent f825238594
commit 724736ff1c
1 changed files with 6 additions and 1 deletions

View File

@ -312,6 +312,11 @@ static void setup_sync_tunnel(private_ha_sync_socket_t *this)
auth_cfg_t *auth_cfg;
child_cfg_t *child_cfg;
traffic_selector_t *ts;
lifetime_cfg_t lifetime = {
.time = {
.life = 21600, .rekey = 20400, .jitter = 400,
},
};
secret = lib->settings->get_str(lib->settings,
"charon.plugins.ha_sync.secret", NULL);
@ -357,7 +362,7 @@ static void setup_sync_tunnel(private_ha_sync_socket_t *this)
identification_create_from_string(remote));
peer_cfg->add_auth_cfg(peer_cfg, auth_cfg, FALSE);
child_cfg = child_cfg_create("ha-sync", 0, 21600, 1200, FALSE, TRUE,
child_cfg = child_cfg_create("ha-sync", &lifetime, NULL, TRUE,
MODE_TRANSPORT, ACTION_NONE, ACTION_NONE, FALSE);
ts = traffic_selector_create_dynamic(0, HA_SYNC_PORT, HA_SYNC_PORT);
child_cfg->add_traffic_selector(child_cfg, TRUE, ts);