workaround for peers rekeying at the same time

loading lifetime policies from ipsec.conf
This commit is contained in:
Martin Willi
2006-06-12 07:33:20 +00:00
parent 695723d4e8
commit a2a3fb3e25
14 changed files with 107 additions and 20 deletions
+6 -2
View File
@@ -28,8 +28,6 @@
#include "stroke.h"
#define streq(a, b) (strcmp((a), (b)) == 0) /* clearer shorthand */
static char* push_string(stroke_msg_t *msg, char *string)
{
u_int string_start = msg->length;
@@ -103,6 +101,12 @@ static int add_connection(char *name,
msg.add_conn.name = push_string(&msg, name);
msg.add_conn.ikev2 = 1;
msg.add_conn.rekey.ipsec_lifetime = 0;
msg.add_conn.rekey.ike_lifetime = 0;
msg.add_conn.rekey.margin = 0;
msg.add_conn.rekey.tries = 0;
msg.add_conn.rekey.fuzz = 0;
msg.add_conn.me.id = push_string(&msg, my_id);
msg.add_conn.me.address = push_string(&msg, my_addr);
msg.add_conn.me.subnet = push_string(&msg, my_net);
+7
View File
@@ -86,6 +86,13 @@ struct stroke_msg_t {
struct {
char *name;
bool ikev2;
struct {
time_t ipsec_lifetime;
time_t ike_lifetime;
time_t margin;
unsigned long tries;
unsigned long fuzz;
} rekey;
stroke_end_t me, other;
} add_conn;