aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/config/connections/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/charon/config/connections/connection.c')
-rw-r--r--src/charon/config/connections/connection.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/charon/config/connections/connection.c b/src/charon/config/connections/connection.c
index a3acf2609..77f7ef82c 100644
--- a/src/charon/config/connections/connection.c
+++ b/src/charon/config/connections/connection.c
@@ -110,6 +110,11 @@ struct private_connection_t {
u_int32_t hard_lifetime;
/**
+ * Use full reauthentication instead of rekeying
+ */
+ bool reauth;
+
+ /**
* Time, which specifies the range of a random value
* substracted from soft_lifetime.
*/
@@ -306,7 +311,7 @@ static u_int32_t get_soft_lifetime(private_connection_t *this)
}
/**
- * Implementation of connection_t.get_hard_lifetime
+ * Implementation of connection_t.get_hard_lifetime.
*/
static u_int32_t get_hard_lifetime(private_connection_t *this)
{
@@ -314,6 +319,14 @@ static u_int32_t get_hard_lifetime(private_connection_t *this)
}
/**
+ * Implementation of connection_t.get_reauth.
+ */
+static bool get_reauth(private_connection_t *this)
+{
+ return this->reauth;
+}
+
+/**
* Implementation of connection_t.get_ref.
*/
static void get_ref(private_connection_t *this)
@@ -343,7 +356,7 @@ connection_t * connection_create(char *name, bool ikev2,
cert_policy_t cert_policy,
cert_policy_t certreq_policy,
host_t *my_host, host_t *other_host,
- u_int32_t dpd_delay,
+ u_int32_t dpd_delay, bool reauth,
u_int32_t retrans_sequences,
u_int32_t hard_lifetime,
u_int32_t soft_lifetime, u_int32_t jitter)
@@ -361,6 +374,7 @@ connection_t * connection_create(char *name, bool ikev2,
this->public.select_proposal = (proposal_t*(*)(connection_t*,linked_list_t*))select_proposal;
this->public.add_proposal = (void(*)(connection_t*, proposal_t*)) add_proposal;
this->public.get_dpd_delay = (u_int32_t(*)(connection_t*)) get_dpd_delay;
+ this->public.get_reauth = (bool(*)(connection_t*)) get_reauth;
this->public.get_retrans_seq = (u_int32_t(*)(connection_t*)) get_retrans_seq;
this->public.get_dh_group = (diffie_hellman_group_t(*)(connection_t*)) get_dh_group;
this->public.check_dh_group = (bool(*)(connection_t*,diffie_hellman_group_t)) check_dh_group;
@@ -378,6 +392,7 @@ connection_t * connection_create(char *name, bool ikev2,
this->my_host = my_host;
this->other_host = other_host;
this->dpd_delay = dpd_delay;
+ this->reauth = reauth;
this->retrans_sequences = retrans_sequences;
this->hard_lifetime = hard_lifetime;
this->soft_lifetime = soft_lifetime;