diff options
author | Tobias Brunner <tobias@strongswan.org> | 2016-04-04 18:41:17 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2016-04-09 16:51:01 +0200 |
commit | 2ba5dadb12dd95c9ba5ff99e619fb33388582661 (patch) | |
tree | 2a1a93fafd2c8bccff3704af74fa968647fe1b5d /src/libcharon/plugins/medsrv/medsrv_config.c | |
parent | 8a00a8452ddb36ec07038242c029a214b0417ae8 (diff) | |
download | strongswan-2ba5dadb12dd95c9ba5ff99e619fb33388582661.tar.bz2 strongswan-2ba5dadb12dd95c9ba5ff99e619fb33388582661.tar.xz |
peer-cfg: Use struct to pass data to constructor
Diffstat (limited to 'src/libcharon/plugins/medsrv/medsrv_config.c')
-rw-r--r-- | src/libcharon/plugins/medsrv/medsrv_config.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/libcharon/plugins/medsrv/medsrv_config.c b/src/libcharon/plugins/medsrv/medsrv_config.c index 02d805e06..be7f481b6 100644 --- a/src/libcharon/plugins/medsrv/medsrv_config.c +++ b/src/libcharon/plugins/medsrv/medsrv_config.c @@ -87,14 +87,18 @@ METHOD(backend_t, create_peer_cfg_enumerator, enumerator_t*, if (e->enumerate(e, &name)) { - peer_cfg = peer_cfg_create( - name, this->ike->get_ref(this->ike), - CERT_NEVER_SEND, UNIQUE_REPLACE, - 1, this->rekey*60, 0, /* keytries, rekey, reauth */ - this->rekey*5, this->rekey*3, /* jitter, overtime */ - TRUE, FALSE, TRUE, /* mobike, aggressive, pull */ - this->dpd, 0, /* DPD delay, timeout */ - TRUE, NULL, NULL); /* mediation, med by, peer id */ + peer_cfg_create_t peer = { + .cert_policy = CERT_NEVER_SEND, + .unique = UNIQUE_REPLACE, + .keyingtries = 1, + .rekey_time = this->rekey * 60, + .jitter_time = this->rekey * 5, + .over_time = this->rekey * 3, + .dpd = this->dpd, + .mediation = TRUE, + }; + peer_cfg = peer_cfg_create(name, this->ike->get_ref(this->ike), + &peer); e->destroy(e); auth = auth_cfg_create(); |