aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-06-18 09:55:39 +0200
committerTobias Brunner <tobias@strongswan.org>2014-06-19 14:33:40 +0200
commitc005073d0ba715153e3bea4c41589d1643ae9b64 (patch)
treea3485ced3ebbcf84191dc25459f1493650c1f517 /src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
parent73b22aa842ae0f32d3aaeb79101894cc719ceaf2 (diff)
downloadstrongswan-c005073d0ba715153e3bea4c41589d1643ae9b64.tar.bz2
strongswan-c005073d0ba715153e3bea4c41589d1643ae9b64.tar.xz
kernel-interface: Add destination prefix to get_nexthop()
This allows to determine the next hop to reach a subnet, for instance, when installing routes for shunt policies.
Diffstat (limited to 'src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c')
-rw-r--r--src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c b/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
index 8642b8c0d..314dbaaaf 100644
--- a/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
+++ b/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
@@ -2137,7 +2137,7 @@ static status_t add_policy_internal(private_kernel_netlink_ipsec_t *this,
/* get the nexthop to src (src as we are in POLICY_FWD) */
route->gateway = hydra->kernel_interface->get_nexthop(
hydra->kernel_interface, ipsec->src,
- ipsec->dst);
+ -1, ipsec->dst);
route->dst_net = chunk_alloc(policy->sel.family == AF_INET ? 4 : 16);
memcpy(route->dst_net.ptr, &policy->sel.saddr, route->dst_net.len);