ike-mobike: Always use this task for DPDs even if not behind a NAT
This allows switching to probing mode if the client is on a public IP and this is the active task and connectivity gets restored. We only add NAT-D payloads if we are currently behind a NAT (to detect changed NAT mappings), a MOBIKE update that might follow will add them in case we move behind a NAT.
This commit is contained in:
@@ -1946,8 +1946,7 @@ METHOD(task_manager_t, queue_dpd, void,
|
||||
{
|
||||
ike_mobike_t *mobike;
|
||||
|
||||
if (this->ike_sa->supports_extension(this->ike_sa, EXT_MOBIKE) &&
|
||||
this->ike_sa->has_condition(this->ike_sa, COND_NAT_HERE))
|
||||
if (this->ike_sa->supports_extension(this->ike_sa, EXT_MOBIKE))
|
||||
{
|
||||
#ifdef ME
|
||||
peer_cfg_t *cfg = this->ike_sa->get_peer_cfg(this->ike_sa);
|
||||
|
||||
@@ -193,7 +193,7 @@ static void process_payloads(private_ike_mobike_t *this, message_t *message)
|
||||
case NAT_DETECTION_DESTINATION_IP:
|
||||
{
|
||||
/* NAT check in this MOBIKE exchange, create subtask for it */
|
||||
if (this->natd == NULL)
|
||||
if (!this->natd)
|
||||
{
|
||||
this->natd = ike_natd_create(this->ike_sa, this->initiator);
|
||||
}
|
||||
@@ -648,7 +648,7 @@ METHOD(ike_mobike_t, roam, void,
|
||||
METHOD(ike_mobike_t, dpd, void,
|
||||
private_ike_mobike_t *this)
|
||||
{
|
||||
if (!this->natd)
|
||||
if (!this->natd && this->ike_sa->has_condition(this->ike_sa, COND_NAT_HERE))
|
||||
{
|
||||
this->natd = ike_natd_create(this->ike_sa, this->initiator);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user