fixed dpd for responder
This commit is contained in:
@@ -299,6 +299,14 @@ static void set_name(private_ike_sa_t *this, char* name)
|
|||||||
this->name = strdup(name);
|
this->name = strdup(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implementation of ike_sa_t.set_dpd_delay.
|
||||||
|
*/
|
||||||
|
static void set_dpd_delay(private_ike_sa_t *this, u_int32_t delay)
|
||||||
|
{
|
||||||
|
this->dpd_delay = delay;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of ike_sa_t.get_my_host.
|
* Implementation of ike_sa_t.get_my_host.
|
||||||
*/
|
*/
|
||||||
@@ -2050,6 +2058,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.enable_natt = (void(*)(ike_sa_t*, bool)) enable_natt;
|
||||||
this->public.is_natt_enabled = (bool(*)(ike_sa_t*)) is_natt_enabled;
|
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_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.rekey = (status_t(*)(ike_sa_t*))rekey;
|
this->public.rekey = (status_t(*)(ike_sa_t*))rekey;
|
||||||
this->public.get_rekeying_transaction = (void*(*)(ike_sa_t*))get_rekeying_transaction;
|
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;
|
this->public.set_rekeying_transaction = (void(*)(ike_sa_t*,void*))set_rekeying_transaction;
|
||||||
|
|||||||
@@ -370,6 +370,14 @@ struct ike_sa_t {
|
|||||||
*/
|
*/
|
||||||
void (*enable_natt) (ike_sa_t *this, bool local);
|
void (*enable_natt) (ike_sa_t *this, bool local);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the delay before starting a DPD check in case of inactivity.
|
||||||
|
*
|
||||||
|
* @param this calling object
|
||||||
|
* @param delay dpd delay in seconds
|
||||||
|
*/
|
||||||
|
void (*set_dpd_delay) (ike_sa_t *this, u_int32_t delay);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sends a DPD request to the peer.
|
* @brief Sends a DPD request to the peer.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -581,6 +581,8 @@ static status_t get_response(private_ike_sa_init_t *this,
|
|||||||
{
|
{
|
||||||
this->ike_sa->set_name(this->ike_sa, name);
|
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));
|
||||||
|
|
||||||
/* Precompute NAT-D hashes for incoming NAT notify comparison */
|
/* Precompute NAT-D hashes for incoming NAT notify comparison */
|
||||||
ike_sa_id = request->get_ike_sa_id(request);
|
ike_sa_id = request->get_ike_sa_id(request);
|
||||||
|
|||||||
Reference in New Issue
Block a user