}
/**
- * 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);
}
/**
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;
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.
{
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);