child-sa: Change API used to set/install policies

This way we only have to pass the traffic selectors once.
This commit is contained in:
Tobias Brunner
2017-05-23 18:41:31 +02:00
parent 29ef4cf5f4
commit 4989aba822
6 changed files with 119 additions and 79 deletions
+2 -1
View File
@@ -272,7 +272,8 @@ METHOD(trap_manager_t, install, uint32_t,
proposals->destroy_offset(proposals, offsetof(proposal_t, destroy));
child_sa->set_protocol(child_sa, proto);
child_sa->set_mode(child_sa, child->get_mode(child));
status = child_sa->add_policies(child_sa, my_ts, other_ts);
child_sa->set_policies(child_sa, my_ts, other_ts);
status = child_sa->install_policies(child_sa);
my_ts->destroy_offset(my_ts, offsetof(traffic_selector_t, destroy));
other_ts->destroy_offset(other_ts, offsetof(traffic_selector_t, destroy));
if (status != SUCCESS)