Use virtual IP to substitute dynamic traffic selectors in quick mode

This commit is contained in:
Martin Willi
2012-03-20 17:31:17 +01:00
parent 156b8662a6
commit ea9e047bc5
+4
View File
@@ -296,6 +296,9 @@ static traffic_selector_t* select_ts(private_quick_mode_t *this, bool initiator)
linked_list_t *list; linked_list_t *list;
host_t *host; host_t *host;
host = this->ike_sa->get_virtual_ip(this->ike_sa, initiator);
if (!host)
{
if (initiator) if (initiator)
{ {
host = this->ike_sa->get_my_host(this->ike_sa); host = this->ike_sa->get_my_host(this->ike_sa);
@@ -304,6 +307,7 @@ static traffic_selector_t* select_ts(private_quick_mode_t *this, bool initiator)
{ {
host = this->ike_sa->get_other_host(this->ike_sa); host = this->ike_sa->get_other_host(this->ike_sa);
} }
}
list = this->config->get_traffic_selectors(this->config, initiator, list = this->config->get_traffic_selectors(this->config, initiator,
NULL, host); NULL, host);
if (list->get_first(list, (void**)&ts) == SUCCESS) if (list->get_first(list, (void**)&ts) == SUCCESS)