added close_action as a seperate config option to dpd_action

This commit is contained in:
Martin Willi
2008-04-14 08:17:18 +00:00
parent cadb5d16e5
commit 348af092ac
7 changed files with 72 additions and 32 deletions
+2 -1
View File
@@ -133,7 +133,8 @@ static child_cfg_t *build_child_cfg(private_sql_config_t *this, enumerator_t *e)
&updown, &hostaccess, &mode))
{
child_cfg = child_cfg_create(name, lifetime, rekeytime, jitter,
updown, hostaccess, mode, ACTION_NONE);
updown, hostaccess, mode,
ACTION_NONE, ACTION_NONE);
/* TODO: read proposal from db */
child_cfg->add_proposal(child_cfg, proposal_create_default(PROTO_ESP));
add_traffic_selectors(this, child_cfg, id);
+5 -5
View File
@@ -626,18 +626,18 @@ static child_cfg_t *build_child_cfg(private_stroke_config_t *this,
{
child_cfg_t *child_cfg;
traffic_selector_t *ts;
action_t action;
action_t dpd;
switch (msg->add_conn.dpd.action)
{ /* map startes magic values to our action type */
case 2: /* =hold */
action = ACTION_ROUTE;
dpd = ACTION_ROUTE;
break;
case 3: /* =restart */
action = ACTION_RESTART;
dpd = ACTION_RESTART;
break;
default:
action = ACTION_NONE;
dpd = ACTION_NONE;
break;
}
child_cfg = child_cfg_create(
@@ -645,7 +645,7 @@ static child_cfg_t *build_child_cfg(private_stroke_config_t *this,
msg->add_conn.rekey.ipsec_lifetime - msg->add_conn.rekey.margin,
msg->add_conn.rekey.margin * msg->add_conn.rekey.fuzz / 100,
msg->add_conn.me.updown, msg->add_conn.me.hostaccess,
msg->add_conn.mode, action);
msg->add_conn.mode, dpd, ACTION_NONE);
ts = build_ts(this, &msg->add_conn.me);
if (!ts)