Install virtual IPs via interface name, and use an interface lookup where required

This commit is contained in:
Martin Willi
2012-11-29 10:22:51 +01:00
parent 0a54d3e1a1
commit b185cdd16d
9 changed files with 49 additions and 55 deletions
+9 -2
View File
@@ -824,8 +824,15 @@ METHOD(child_sa_t, add_policies, status_t,
*/
static void reinstall_vip(host_t *vip, host_t *me)
{
hydra->kernel_interface->del_ip(hydra->kernel_interface, vip, -1);
hydra->kernel_interface->add_ip(hydra->kernel_interface, vip, -1, me);
char *iface;
if (hydra->kernel_interface->get_interface(hydra->kernel_interface,
me, &iface))
{
hydra->kernel_interface->del_ip(hydra->kernel_interface, vip, -1);
hydra->kernel_interface->add_ip(hydra->kernel_interface, vip, -1, iface);
free(iface);
}
}
METHOD(child_sa_t, update, status_t,