aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-09-25 07:24:08 +0000
committerMartin Willi <martin@strongswan.org>2006-09-25 07:24:08 +0000
commit1ce2ad09c317c785a7fbf46fd17ea5caef2aac8c (patch)
tree0486d318f0c1798ef911adeb0fba5f2085188566
parent397f344879d05a1834438369f77dada52698ec15 (diff)
downloadstrongswan-1ce2ad09c317c785a7fbf46fd17ea5caef2aac8c.tar.bz2
strongswan-1ce2ad09c317c785a7fbf46fd17ea5caef2aac8c.tar.xz
fixed retransmission policy for responder
-rw-r--r--src/charon/sa/ike_sa.c9
-rw-r--r--src/charon/sa/ike_sa.h6
-rw-r--r--src/charon/sa/transactions/ike_sa_init.c3
3 files changed, 9 insertions, 9 deletions
diff --git a/src/charon/sa/ike_sa.c b/src/charon/sa/ike_sa.c
index 8c181b375..671e2b23b 100644
--- a/src/charon/sa/ike_sa.c
+++ b/src/charon/sa/ike_sa.c
@@ -300,11 +300,12 @@ static void set_name(private_ike_sa_t *this, char* name)
}
/**
- * Implementation of ike_sa_t.set_dpd_delay.
+ * Implementation of ike_sa_t.apply_connection.
*/
-static void set_dpd_delay(private_ike_sa_t *this, u_int32_t delay)
+static void apply_connection(private_ike_sa_t *this, connection_t *connection)
{
- this->dpd_delay = delay;
+ this->dpd_delay = connection->get_dpd_delay(connection);
+ this->retrans_sequences = connection->get_retrans_seq(connection);
}
/**
@@ -2058,7 +2059,7 @@ ike_sa_t * ike_sa_create(ike_sa_id_t *ike_sa_id)
this->public.enable_natt = (void(*)(ike_sa_t*, bool)) enable_natt;
this->public.is_natt_enabled = (bool(*)(ike_sa_t*)) is_natt_enabled;
this->public.set_lifetimes = (void(*)(ike_sa_t*,u_int32_t,u_int32_t))set_lifetimes;
- this->public.set_dpd_delay = (void(*)(ike_sa_t*,u_int32_t))set_dpd_delay;
+ this->public.apply_connection = (void(*)(ike_sa_t*,connection_t*))apply_connection;
this->public.rekey = (status_t(*)(ike_sa_t*))rekey;
this->public.get_rekeying_transaction = (void*(*)(ike_sa_t*))get_rekeying_transaction;
this->public.set_rekeying_transaction = (void(*)(ike_sa_t*,void*))set_rekeying_transaction;
diff --git a/src/charon/sa/ike_sa.h b/src/charon/sa/ike_sa.h
index a50df3e6c..0f359cb23 100644
--- a/src/charon/sa/ike_sa.h
+++ b/src/charon/sa/ike_sa.h
@@ -371,12 +371,12 @@ struct ike_sa_t {
void (*enable_natt) (ike_sa_t *this, bool local);
/**
- * @brief Set the delay before starting a DPD check in case of inactivity.
+ * @brief Apply connection parameters for this IKE_SA.
*
* @param this calling object
- * @param delay dpd delay in seconds
+ * @param connection connection definition
*/
- void (*set_dpd_delay) (ike_sa_t *this, u_int32_t delay);
+ void (*apply_connection) (ike_sa_t *this, connection_t *connection);
/**
* @brief Sends a DPD request to the peer.
diff --git a/src/charon/sa/transactions/ike_sa_init.c b/src/charon/sa/transactions/ike_sa_init.c
index 7343e2aef..855e98506 100644
--- a/src/charon/sa/transactions/ike_sa_init.c
+++ b/src/charon/sa/transactions/ike_sa_init.c
@@ -581,8 +581,7 @@ static status_t get_response(private_ike_sa_init_t *this,
{
this->ike_sa->set_name(this->ike_sa, name);
}
- this->ike_sa->set_dpd_delay(this->ike_sa,
- this->connection->get_dpd_delay(this->connection));
+ this->ike_sa->apply_connection(this->ike_sa, this->connection);
/* Precompute NAT-D hashes for incoming NAT notify comparison */
ike_sa_id = request->get_ike_sa_id(request);