ike-cfg: Pass arguments as struct

This commit is contained in:
Tobias Brunner
2019-04-25 14:31:33 +02:00
parent de77957eda
commit 9486a2e5b0
18 changed files with 253 additions and 153 deletions
+11 -3
View File
@@ -272,10 +272,18 @@ static ike_cfg_t *build_ike_cfg(private_sql_config_t *this, enumerator_t *e,
while (e->enumerate(e, &id, &certreq, &force_encap, &local, &remote))
{
ike_cfg_t *ike_cfg;
ike_cfg_create_t ike = {
.version = IKEV2,
.local = local,
.local_port = charon->socket->get_port(charon->socket, FALSE),
.remote = remote,
.remote_port = IKEV2_UDP_PORT,
.no_certreq = !certreq,
.force_encap = force_encap,
.fragmentation = FRAGMENTATION_YES,
};
ike_cfg = ike_cfg_create(IKEV2, certreq, force_encap, local,
charon->socket->get_port(charon->socket, FALSE),
remote, IKEV2_UDP_PORT, FRAGMENTATION_NO, 0);
ike_cfg = ike_cfg_create(&ike);
add_ike_proposals(this, ike_cfg, id);
return ike_cfg;
}