aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/kernel_libipsec
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-03-11 18:54:31 +0100
committerTobias Brunner <tobias@strongswan.org>2016-06-10 13:54:18 +0200
commit99a57aa5ee15affa9e38595d90971031977e34be (patch)
tree701a88959db7936158a1187270ddc9de32ddd8c4 /src/libcharon/plugins/kernel_libipsec
parent436f64d5bcc3946387dd95265d83d8764fe37797 (diff)
downloadstrongswan-99a57aa5ee15affa9e38595d90971031977e34be.tar.bz2
strongswan-99a57aa5ee15affa9e38595d90971031977e34be.tar.xz
kernel-net: Let get_nexthop() return an optional interface name
The returned name should be the interface over which the destination address/net is reachable.
Diffstat (limited to 'src/libcharon/plugins/kernel_libipsec')
-rw-r--r--src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c b/src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c
index f1340320a..77e37e249 100644
--- a/src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c
+++ b/src/libcharon/plugins/kernel_libipsec/kernel_libipsec_ipsec.c
@@ -308,7 +308,7 @@ static void add_exclude_route(private_kernel_libipsec_ipsec_t *this,
if (!route->exclude)
{
DBG2(DBG_KNL, "installing new exclude route for %H src %H", dst, src);
- gtw = charon->kernel->get_nexthop(charon->kernel, dst, -1, NULL);
+ gtw = charon->kernel->get_nexthop(charon->kernel, dst, -1, NULL, NULL);
if (gtw)
{
char *if_name = NULL;
@@ -434,7 +434,8 @@ static bool install_route(private_kernel_libipsec_ipsec_t *this,
);
#ifndef __linux__
/* on Linux we cant't install a gateway */
- route->gateway = charon->kernel->get_nexthop(charon->kernel, dst, -1, src);
+ route->gateway = charon->kernel->get_nexthop(charon->kernel, dst, -1, src,
+ NULL);
#endif
if (policy->route)