summaryrefslogtreecommitdiff
path: root/src/libcharon/sa/child_sa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/sa/child_sa.c')
-rw-r--r--src/libcharon/sa/child_sa.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libcharon/sa/child_sa.c b/src/libcharon/sa/child_sa.c
index 1245734c9..f02d836cf 100644
--- a/src/libcharon/sa/child_sa.c
+++ b/src/libcharon/sa/child_sa.c
@@ -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);
- hydra->kernel_interface->add_ip(hydra->kernel_interface, vip, me);
+ char *iface;
+
+ if (hydra->kernel_interface->get_interface(hydra->kernel_interface,
+ me, &iface))
+ {
+ hydra->kernel_interface->del_ip(hydra->kernel_interface, vip, -1, TRUE);
+ hydra->kernel_interface->add_ip(hydra->kernel_interface, vip, -1, iface);
+ free(iface);
+ }
}
METHOD(child_sa_t, update, status_t,