peer-cfg: Consider security labels when selecting child configs

This commit is contained in:
Tobias Brunner
2022-04-14 18:42:01 +02:00
parent 63d4bd071f
commit 03729958db
4 changed files with 42 additions and 18 deletions
+1 -1
View File
@@ -1096,7 +1096,7 @@ METHOD(task_t, process_r, status_t,
hostsi = get_dynamic_hosts(this->ike_sa, FALSE);
hostsr = get_dynamic_hosts(this->ike_sa, TRUE);
this->config = peer_cfg->select_child_cfg(peer_cfg, tsr, tsi,
hostsr, hostsi);
hostsr, hostsi, NULL, NULL);
hostsi->destroy(hostsi);
hostsr->destroy(hostsr);
if (this->config)
+3 -2
View File
@@ -1414,7 +1414,7 @@ static child_cfg_t* select_child_cfg(private_child_create_t *this)
listi = get_dynamic_hosts(this->ike_sa, FALSE);
child_cfg = peer_cfg->select_child_cfg(peer_cfg,
tsr ?: this->tsr, tsi ?: this->tsi,
listr, listi);
listr, listi, NULL, NULL);
if ((tsi || tsr) && child_cfg &&
child_cfg->get_mode(child_cfg) != MODE_TRANSPORT)
{
@@ -1426,7 +1426,8 @@ static child_cfg_t* select_child_cfg(private_child_create_t *this)
{
/* no match for the substituted NAT selectors, try it without */
child_cfg = peer_cfg->select_child_cfg(peer_cfg,
this->tsr, this->tsi, listr, listi);
this->tsr, this->tsi,
listr, listi, NULL, NULL);
}
listr->destroy(listr);
listi->destroy(listi);