aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2012-09-18 17:55:38 +0200
committerTobias Brunner <tobias@strongswan.org>2012-09-21 18:16:25 +0200
commitdad6d904ee96a2411c4bfa30cc59f1451f6e13df (patch)
treed8444ca189a4c39d06e3b595d16edd1be3c17b96 /src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
parent662534657f4336b220ea10c17e6df2d422970ea3 (diff)
downloadstrongswan-dad6d904ee96a2411c4bfa30cc59f1451f6e13df.tar.bz2
strongswan-dad6d904ee96a2411c4bfa30cc59f1451f6e13df.tar.xz
Use source address in get_nexthop() call
Otherwise the nexthop returned might belong to a different route than the one actually used with the current source address.
Diffstat (limited to 'src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c')
-rw-r--r--src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c b/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
index fa7f6107c..ac1122d16 100644
--- a/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
+++ b/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
@@ -2174,7 +2174,7 @@ METHOD(kernel_ipsec_t, add_policy, status_t,
/* get the nexthop to dst */
route->gateway = hydra->kernel_interface->get_nexthop(
- hydra->kernel_interface, dst);
+ hydra->kernel_interface, dst, route->src_ip);
route->dst_net = chunk_clone(policy->dst.net->get_address(policy->dst.net));
route->prefixlen = policy->dst.mask;