aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/threads/stroke_interface.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-06-12 07:33:20 +0000
committerMartin Willi <martin@strongswan.org>2006-06-12 07:33:20 +0000
commita2a3fb3e250991c5558a5d1cd24eab2a414474ab (patch)
treee4487b71a78632de3a3273608f46e7706f96f121 /src/charon/threads/stroke_interface.c
parent695723d4e877b6cba235f630a15b6e04e484a695 (diff)
downloadstrongswan-a2a3fb3e250991c5558a5d1cd24eab2a414474ab.tar.bz2
strongswan-a2a3fb3e250991c5558a5d1cd24eab2a414474ab.tar.xz
workaround for peers rekeying at the same time
loading lifetime policies from ipsec.conf
Diffstat (limited to 'src/charon/threads/stroke_interface.c')
-rwxr-xr-xsrc/charon/threads/stroke_interface.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/charon/threads/stroke_interface.c b/src/charon/threads/stroke_interface.c
index b2d49c946..2ca9a0a4a 100755
--- a/src/charon/threads/stroke_interface.c
+++ b/src/charon/threads/stroke_interface.c
@@ -332,7 +332,10 @@ static void stroke_add_conn(private_stroke_t *this, stroke_msg_t *msg)
other_host->get_address(other_host),
other_id->get_string(other_id));
- policy = policy_create(msg->add_conn.name, my_id, other_id);
+ policy = policy_create(msg->add_conn.name, my_id, other_id,
+ msg->add_conn.rekey.ipsec_lifetime,
+ msg->add_conn.rekey.ipsec_lifetime - msg->add_conn.rekey.margin,
+ msg->add_conn.rekey.margin * msg->add_conn.rekey.fuzz / 100);
proposal = proposal_create(PROTO_ESP);
proposal->add_algorithm(proposal, ENCRYPTION_ALGORITHM, ENCR_AES_CBC, 128);
proposal->add_algorithm(proposal, ENCRYPTION_ALGORITHM, ENCR_AES_CBC, 256);