kernel-netlink: Also use interface returned by get_nexthop() for IPsec policies
[strongswan.git] / src / libcharon / plugins / kernel_netlink / kernel_netlink_ipsec.c
index 46f94bd..12cad81 100644 (file)
@@ -2320,7 +2320,8 @@ static status_t add_policy_internal(private_kernel_netlink_ipsec_t *this,
                        if (!ipsec->src->is_anyaddr(ipsec->src))
                        {
                                route->gateway = charon->kernel->get_nexthop(charon->kernel,
-                                                                                       ipsec->src, -1, ipsec->dst, NULL);
+                                                                                               ipsec->src, -1, ipsec->dst,
+                                                                                               &route->if_name);
                        }
                        else
                        {       /* for shunt policies */