child-cfg: Use separate method to get configured traffic selectors
Optionally with "dynamic" traffic selectors resolved. A new method is added for those cases where we actually want to select potentially narrowed traffic selectors using a supplied list. The latter now also always logs details, while the former does not.
This commit is contained in:
@@ -55,7 +55,7 @@ static void narrow_ts(child_cfg_t *cfg, traffic_selector_t *ts,
|
||||
|
||||
received = linked_list_create();
|
||||
received->insert_last(received, ts);
|
||||
selected = cfg->get_traffic_selectors(cfg, FALSE, received, NULL, FALSE);
|
||||
selected = cfg->select_traffic_selectors(cfg, FALSE, received, NULL);
|
||||
while (selected->remove_first(selected, (void**)&ts) == SUCCESS)
|
||||
{
|
||||
list->insert_last(list, ts);
|
||||
@@ -139,8 +139,7 @@ static void narrow_responder_post(child_cfg_t *child_cfg, linked_list_t *local)
|
||||
{
|
||||
ts->destroy(ts);
|
||||
}
|
||||
configured = child_cfg->get_traffic_selectors(child_cfg, TRUE, NULL, NULL,
|
||||
FALSE);
|
||||
configured = child_cfg->get_traffic_selectors(child_cfg, TRUE, NULL);
|
||||
|
||||
while (configured->remove_first(configured, (void**)&ts) == SUCCESS)
|
||||
{
|
||||
|
||||
@@ -159,8 +159,7 @@ METHOD(attribute_provider_t, create_attribute_enumerator, enumerator_t*,
|
||||
enumerator = peer_cfg->create_child_cfg_enumerator(peer_cfg);
|
||||
while (enumerator->enumerate(enumerator, &child_cfg))
|
||||
{
|
||||
current = child_cfg->get_traffic_selectors(child_cfg, TRUE, NULL, NULL,
|
||||
FALSE);
|
||||
current = child_cfg->get_traffic_selectors(child_cfg, TRUE, NULL);
|
||||
while (current->remove_first(current, (void**)&ts) == SUCCESS)
|
||||
{
|
||||
if (use_ts(ts))
|
||||
|
||||
Reference in New Issue
Block a user