Make it easy to check if an address is locally usable via changed get_interface() method

This commit is contained in:
Tobias Brunner
2012-09-21 18:16:26 +02:00
parent aed33805ce
commit 9ba36c0f7f
10 changed files with 64 additions and 67 deletions
@@ -2108,7 +2108,7 @@ METHOD(kernel_ipsec_t, add_policy, status_t,
*/
if (policy->route == NULL && direction == POLICY_OUT)
{
char *iface;
char *iface = NULL;
ipsec_dev_t *dev;
route_entry_t *route = malloc_thing(route_entry_t);
route->src_ip = NULL;
@@ -2126,8 +2126,8 @@ METHOD(kernel_ipsec_t, add_policy, status_t,
}
/* find the virtual interface */
iface = hydra->kernel_interface->get_interface(hydra->kernel_interface,
src);
hydra->kernel_interface->get_interface(hydra->kernel_interface,
src, &iface);
if (find_ipsec_dev(this, iface, &dev) == SUCCESS)
{
/* above, we got either the name of a virtual or a physical