kernel-interface: get_address_by_ts() can tell if a returned IP is virtual

This commit is contained in:
Martin Willi
2013-05-06 16:10:13 +02:00
parent 1a2a8bffed
commit f52cf07532
5 changed files with 31 additions and 6 deletions
@@ -2118,7 +2118,7 @@ METHOD(kernel_ipsec_t, add_policy, status_t,
this->install_routes)
{
hydra->kernel_interface->get_address_by_ts(hydra->kernel_interface,
src_ts, &route->src_ip);
src_ts, &route->src_ip, NULL);
}
if (!route->src_ip)
@@ -2102,7 +2102,7 @@ static status_t add_policy_internal(private_kernel_netlink_ipsec_t *this,
);
if (hydra->kernel_interface->get_address_by_ts(hydra->kernel_interface,
fwd->dst_ts, &route->src_ip) == SUCCESS)
fwd->dst_ts, &route->src_ip, NULL) == SUCCESS)
{
/* get the nexthop to src (src as we are in POLICY_FWD) */
route->gateway = hydra->kernel_interface->get_nexthop(
@@ -1925,7 +1925,7 @@ static bool install_route(private_kernel_pfkey_ipsec_t *this,
host_t *host, *src, *dst;
if (hydra->kernel_interface->get_address_by_ts(hydra->kernel_interface,
in->dst_ts, &host) != SUCCESS)
in->dst_ts, &host, NULL) != SUCCESS)
{
return FALSE;
}