aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-06-16 18:59:13 +0200
committerTobias Brunner <tobias@strongswan.org>2013-06-21 17:03:21 +0200
commit34b0ad0653d911c9ba8d89e65377bbf68c63c781 (patch)
treefec724c39d1347105837252c62ae04a226833b6a /src
parentd6c17e96b26e74d6cdb2dfa9355f2acf830811f3 (diff)
downloadstrongswan-34b0ad0653d911c9ba8d89e65377bbf68c63c781.tar.bz2
strongswan-34b0ad0653d911c9ba8d89e65377bbf68c63c781.tar.xz
kernel-pfroute: Use DST as nexthop for host routes
These are created as cache/clone on Mac OS X.
Diffstat (limited to 'src')
-rw-r--r--src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
index e7e6da3d2..21bbf1ac2 100644
--- a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
+++ b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
@@ -1153,6 +1153,12 @@ static host_t *get_route(private_kernel_pfroute_net_t *this, bool nexthop,
host = host_create_from_sockaddr(addr);
break;
}
+ if (nexthop && type == RTAX_DST &&
+ this->reply->rtm_flags & RTF_HOST)
+ { /* probably a cloned direct route */
+ host = host_create_from_sockaddr(addr);
+ break;
+ }
if (!nexthop && type == RTAX_IFA)
{
host = host_create_from_sockaddr(addr);