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:
Tobias Brunner
2025-05-28 10:01:19 +02:00
parent 84da416082
commit c5b2a8eaa3
13 changed files with 190 additions and 153 deletions
+4 -7
View File
@@ -585,10 +585,9 @@ METHOD(stroke_list_t, status, void,
children = peer_cfg->create_child_cfg_enumerator(peer_cfg);
while (children->enumerate(children, &child_cfg))
{
my_ts = child_cfg->get_traffic_selectors(child_cfg, TRUE,
NULL, NULL, FALSE);
my_ts = child_cfg->get_traffic_selectors(child_cfg, TRUE, NULL);
other_ts = child_cfg->get_traffic_selectors(child_cfg, FALSE,
NULL, NULL, FALSE);
NULL);
fprintf(out, "%12s: child: %#R === %#R %N",
child_cfg->get_name(child_cfg), my_ts, other_ts,
ipsec_mode_names, child_cfg->get_mode(child_cfg));
@@ -621,10 +620,8 @@ METHOD(stroke_list_t, status, void,
fprintf(out, "Shunted Connections:\n");
first = FALSE;
}
my_ts = child_cfg->get_traffic_selectors(child_cfg, TRUE, NULL,
NULL, FALSE);
other_ts = child_cfg->get_traffic_selectors(child_cfg, FALSE, NULL,
NULL, FALSE);
my_ts = child_cfg->get_traffic_selectors(child_cfg, TRUE, NULL);
other_ts = child_cfg->get_traffic_selectors(child_cfg, FALSE, NULL);
fprintf(out, "%12s: %#R === %#R %N\n",
child_cfg->get_name(child_cfg), my_ts, other_ts,
ipsec_mode_names, child_cfg->get_mode(child_cfg));