aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-06-16 10:49:25 +0200
committerTobias Brunner <tobias@strongswan.org>2013-06-21 17:03:21 +0200
commitf58f8bf4097a2e30ebf4a70c762824577ea8d11f (patch)
tree5bf49ea93155f92386df691b392c3946e25a2b76 /src
parent1f31a2bc2eeb92bf47272a784e88d893e450a17c (diff)
downloadstrongswan-f58f8bf4097a2e30ebf4a70c762824577ea8d11f.tar.bz2
strongswan-f58f8bf4097a2e30ebf4a70c762824577ea8d11f.tar.xz
kernel-pfroute: Properly install routes with interface and gateway
Diffstat (limited to 'src')
-rw-r--r--src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
index d6fd33a44..540bce5d1 100644
--- a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
+++ b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
@@ -510,7 +510,7 @@ static void process_link(private_kernel_pfroute_net_t *this,
{
enumerator_t *enumerator;
iface_entry_t *iface;
- bool roam = FALSE, found = FALSE;;
+ bool roam = FALSE, found = FALSE;
this->lock->write_lock(this->lock);
enumerator = this->ifaces->create_enumerator(this->ifaces);
@@ -1051,13 +1051,14 @@ static status_t manage_route(private_kernel_pfroute_net_t *this, int op,
dst->get_family(dst), prefixlen);
}
break;
- case RTAX_GATEWAY:
- /* interface name seems to replace gateway on OS X */
+ case RTAX_IFP:
if (if_name)
{
- add_rt_ifname(&msg.hdr, RTA_GATEWAY, if_name);
+ add_rt_ifname(&msg.hdr, RTA_IFP, if_name);
}
- else if (gateway)
+ break;
+ case RTAX_GATEWAY:
+ if (gateway)
{
add_rt_addr(&msg.hdr, RTA_GATEWAY, gateway);
}