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/frontends/osx/charon-xpc/xpc_dispatch.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/frontends/osx/charon-xpc/xpc_dispatch.c')
-rw-r--r-- | src/frontends/osx/charon-xpc/xpc_dispatch.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/frontends/osx/charon-xpc/xpc_dispatch.c b/src/frontends/osx/charon-xpc/xpc_dispatch.c index c8079cce8..0483199df 100644 --- a/src/frontends/osx/charon-xpc/xpc_dispatch.c +++ b/src/frontends/osx/charon-xpc/xpc_dispatch.c @@ -78,6 +78,15 @@ static peer_cfg_t* create_peer_cfg(char *name, char *host) ike_cfg_t *ike_cfg; peer_cfg_t *peer_cfg; uint16_t local_port, remote_port = IKEV2_UDP_PORT; + peer_cfg_create_t peer = { + .cert_policy = CERT_SEND_IF_ASKED, + .unique = UNIQUE_REPLACE, + .keyingtries = 1, + .rekey_time = 36000, /* 10h */ + .jitter_time = 600, /* 10min */ + .over_time = 600, /* 10min */ + .dpd = 30, + }; local_port = charon->socket->get_port(charon->socket, FALSE); if (local_port != IKEV2_UDP_PORT) @@ -88,13 +97,7 @@ static peer_cfg_t* create_peer_cfg(char *name, char *host) host, remote_port, FRAGMENTATION_NO, 0); ike_cfg->add_proposal(ike_cfg, proposal_create_default(PROTO_IKE)); ike_cfg->add_proposal(ike_cfg, proposal_create_default_aead(PROTO_IKE)); - peer_cfg = peer_cfg_create(name, ike_cfg, - CERT_SEND_IF_ASKED, UNIQUE_REPLACE, 1, /* keyingtries */ - 36000, 0, /* rekey 10h, reauth none */ - 600, 600, /* jitter, over 10min */ - TRUE, FALSE, TRUE, /* mobike, aggressive, pull */ - 30, 0, /* DPD delay, timeout */ - FALSE, NULL, NULL); /* mediation */ + peer_cfg = peer_cfg_create(name, ike_cfg, &peer); peer_cfg->add_virtual_ip(peer_cfg, host_create_from_string("0.0.0.0", 0)); return peer_cfg; |