ikev1: Always send ID payloads (traffic selectors) during Quick Mode
Especially Windows 7 has problems if the peer does not send ID payloads for host-to-host connections (tunnel and transport mode). Fixes #319.
This commit is contained in:
@@ -510,33 +510,11 @@ static traffic_selector_t* select_ts(private_quick_mode_t *this, bool local,
|
|||||||
static void add_ts(private_quick_mode_t *this, message_t *message)
|
static void add_ts(private_quick_mode_t *this, message_t *message)
|
||||||
{
|
{
|
||||||
id_payload_t *id_payload;
|
id_payload_t *id_payload;
|
||||||
host_t *hsi, *hsr;
|
|
||||||
|
|
||||||
if (this->initiator)
|
id_payload = id_payload_create_from_ts(this->tsi);
|
||||||
{
|
message->add_payload(message, &id_payload->payload_interface);
|
||||||
hsi = this->ike_sa->get_my_host(this->ike_sa);
|
id_payload = id_payload_create_from_ts(this->tsr);
|
||||||
hsr = this->ike_sa->get_other_host(this->ike_sa);
|
message->add_payload(message, &id_payload->payload_interface);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hsr = this->ike_sa->get_my_host(this->ike_sa);
|
|
||||||
hsi = this->ike_sa->get_other_host(this->ike_sa);
|
|
||||||
}
|
|
||||||
/* add ID payload only if negotiating non host2host tunnels */
|
|
||||||
if (!this->tsi->is_host(this->tsi, hsi) ||
|
|
||||||
!this->tsr->is_host(this->tsr, hsr) ||
|
|
||||||
this->tsi->get_protocol(this->tsi) ||
|
|
||||||
this->tsr->get_protocol(this->tsr) ||
|
|
||||||
this->tsi->get_from_port(this->tsi) ||
|
|
||||||
this->tsr->get_from_port(this->tsr) ||
|
|
||||||
this->tsi->get_to_port(this->tsi) != 65535 ||
|
|
||||||
this->tsr->get_to_port(this->tsr) != 65535)
|
|
||||||
{
|
|
||||||
id_payload = id_payload_create_from_ts(this->tsi);
|
|
||||||
message->add_payload(message, &id_payload->payload_interface);
|
|
||||||
id_payload = id_payload_create_from_ts(this->tsr);
|
|
||||||
message->add_payload(message, &id_payload->payload_interface);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user