ike-cfg: Pass arguments as struct
This commit is contained in:
@@ -130,6 +130,14 @@ METHOD(medsrv_config_t, destroy, void,
|
||||
medsrv_config_t *medsrv_config_create(database_t *db)
|
||||
{
|
||||
private_medsrv_config_t *this;
|
||||
ike_cfg_create_t ike = {
|
||||
.version = IKEV2,
|
||||
.local = "0.0.0.0",
|
||||
.local_port = charon->socket->get_port(charon->socket, FALSE),
|
||||
.remote = "0.0.0.0",
|
||||
.remote_port = IKEV2_UDP_PORT,
|
||||
.no_certreq = TRUE,
|
||||
};
|
||||
|
||||
INIT(this,
|
||||
.public = {
|
||||
@@ -143,10 +151,7 @@ medsrv_config_t *medsrv_config_create(database_t *db)
|
||||
.db = db,
|
||||
.rekey = lib->settings->get_time(lib->settings, "medsrv.rekey", 1200),
|
||||
.dpd = lib->settings->get_time(lib->settings, "medsrv.dpd", 300),
|
||||
.ike = ike_cfg_create(IKEV2, FALSE, FALSE, "0.0.0.0",
|
||||
charon->socket->get_port(charon->socket, FALSE),
|
||||
"0.0.0.0", IKEV2_UDP_PORT,
|
||||
FRAGMENTATION_NO, 0),
|
||||
.ike = ike_cfg_create(&ike),
|
||||
);
|
||||
this->ike->add_proposal(this->ike, proposal_create_default(PROTO_IKE));
|
||||
this->ike->add_proposal(this->ike, proposal_create_default_aead(PROTO_IKE));
|
||||
|
||||
Reference in New Issue
Block a user