cache keys for in and outbound ESP SAs
removed redundant storing of traffic selectors in CHILD_SA (sa_policy_t) creating TS pairs dynamically using create_policy_enumerator()
This commit is contained in:
@@ -181,19 +181,13 @@ static void write_childend(xmlTextWriterPtr writer, child_sa_t *child, bool loca
|
||||
*/
|
||||
static void write_child(xmlTextWriterPtr writer, child_sa_t *child)
|
||||
{
|
||||
ipsec_mode_t mode;
|
||||
encryption_algorithm_t encr;
|
||||
integrity_algorithm_t int_algo;
|
||||
chunk_t encr_key, int_key;
|
||||
u_int32_t rekey, use_in, use_out, use_fwd;
|
||||
child_cfg_t *config;
|
||||
|
||||
config = child->get_config(child);
|
||||
child->get_stats(child, &mode, &encr, &encr_key, &int_algo, &int_key,
|
||||
&rekey, &use_in, &use_out, &use_fwd);
|
||||
|
||||
xmlTextWriterStartElement(writer, "childsa");
|
||||
xmlTextWriterWriteFormatElement(writer, "reqid", "%d", child->get_reqid(child));
|
||||
xmlTextWriterWriteFormatElement(writer, "reqid", "%d",
|
||||
child->get_reqid(child));
|
||||
xmlTextWriterWriteFormatElement(writer, "childconfig", "%s",
|
||||
config->get_name(config));
|
||||
xmlTextWriterStartElement(writer, "local");
|
||||
|
||||
@@ -129,9 +129,9 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
|
||||
chunk_t encr_key, int_key;
|
||||
ipsec_mode_t mode;
|
||||
|
||||
child_sa->get_stats(child_sa, &mode, &encr_alg, &encr_key,
|
||||
&int_alg, &int_key, &rekey, &use_in, &use_out,
|
||||
&use_fwd);
|
||||
child_sa->get_stats(child_sa, &mode,
|
||||
&encr_alg, &encr_key, NULL, &int_alg, &int_key, NULL,
|
||||
&rekey, &use_in, &use_out, &use_fwd);
|
||||
|
||||
fprintf(out, "%12s{%d}: %N, %N",
|
||||
child_sa->get_name(child_sa), child_sa->get_reqid(child_sa),
|
||||
|
||||
Reference in New Issue
Block a user