time values in strongswan.conf can be optionally specified in days (d), hours (h), minutes (m), or seconds (s)
This commit is contained in:
@@ -354,9 +354,8 @@ medcli_config_t *medcli_config_create(database_t *db)
|
||||
this->public.destroy = (void(*)(medcli_config_t*))destroy;
|
||||
|
||||
this->db = db;
|
||||
this->rekey = lib->settings->get_int(lib->settings,
|
||||
"medcli.rekey", 20) * 60;
|
||||
this->dpd = lib->settings->get_int(lib->settings, "medcli.dpd", 300);
|
||||
this->rekey = lib->settings->get_time(lib->settings, "medcli.rekey", 1200);
|
||||
this->dpd = lib->settings->get_time(lib->settings, "medcli.dpd", 300);
|
||||
this->ike = ike_cfg_create(FALSE, FALSE, "0.0.0.0", "0.0.0.0");
|
||||
this->ike->add_proposal(this->ike, proposal_create_default(PROTO_IKE));
|
||||
|
||||
|
||||
@@ -135,9 +135,8 @@ medsrv_config_t *medsrv_config_create(database_t *db)
|
||||
this->public.destroy = (void(*)(medsrv_config_t*))destroy;
|
||||
|
||||
this->db = db;
|
||||
this->rekey = lib->settings->get_int(lib->settings,
|
||||
"medsrv.rekey", 20) * 60;
|
||||
this->dpd = lib->settings->get_int(lib->settings, "medsrv.dpd", 300);
|
||||
this->rekey = lib->settings->get_time(lib->settings, "medsrv.rekey", 1200);
|
||||
this->dpd = lib->settings->get_time(lib->settings, "medsrv.dpd", 300);
|
||||
this->ike = ike_cfg_create(FALSE, FALSE, "0.0.0.0", "0.0.0.0");
|
||||
this->ike->add_proposal(this->ike, proposal_create_default(PROTO_IKE));
|
||||
|
||||
|
||||
@@ -2621,7 +2621,7 @@ ike_sa_t * ike_sa_create(ike_sa_id_t *ike_sa_id)
|
||||
this->skp_build = chunk_empty;
|
||||
this->child_prf = NULL;
|
||||
this->state = IKE_CREATED;
|
||||
this->keepalive_interval = lib->settings->get_int(lib->settings,
|
||||
this->keepalive_interval = lib->settings->get_time(lib->settings,
|
||||
"charon.keep_alive", KEEPALIVE_INTERVAL);
|
||||
this->time.inbound = this->time.outbound = time(NULL);
|
||||
this->time.established = 0;
|
||||
|
||||
Reference in New Issue
Block a user