vici: Make hardware offload configurable

This commit is contained in:
Tobias Brunner
2017-05-23 16:58:00 +02:00
parent aeee0bcc30
commit 7c4f88d4be
2 changed files with 15 additions and 0 deletions
+11
View File
@@ -524,6 +524,7 @@ static void log_child_data(child_data_t *data, char *name)
DBG2(DBG_CFG, " proposals = %#P", data->proposals);
DBG2(DBG_CFG, " local_ts = %#R", data->local_ts);
DBG2(DBG_CFG, " remote_ts = %#R", data->remote_ts);
DBG2(DBG_CFG, " hw_offload = %u", cfg->options & OPT_HW_OFFLOAD);
}
/**
@@ -881,6 +882,15 @@ CALLBACK(parse_opt_ipcomp, bool,
return parse_option(out, OPT_IPCOMP, v);
}
/**
* Parse OPT_HW_OFFLOAD option
*/
CALLBACK(parse_opt_hw_offl, bool,
child_cfg_option_t *out, chunk_t v)
{
return parse_option(out, OPT_HW_OFFLOAD, v);
}
/**
* Parse an action_t
*/
@@ -1539,6 +1549,7 @@ CALLBACK(child_kv, bool,
{ "tfc_padding", parse_tfc, &child->cfg.tfc },
{ "priority", parse_uint32, &child->cfg.priority },
{ "interface", parse_string, &child->cfg.interface },
{ "hw_offload", parse_opt_hw_offl, &child->cfg.options },
};
return parse_rules(rules, countof(rules), name, value,
+4
View File
@@ -888,6 +888,10 @@ connections.<conn>.children.<child>.replay_window = 32
default of 32 are supported using the Netlink backend only, a value of 0
disables IPsec replay protection.
connections.<conn>.children.<child>.hw_offload = no
Enable hardware offload for this CHILD_SA, if supported by the IPsec
implementation.
connections.<conn>.children.<child>.start_action = none
Action to perform after loading the configuration (_none_, _trap_, _start_).