aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-06-17 15:38:35 +0200
committerTobias Brunner <tobias@strongswan.org>2013-06-21 17:03:22 +0200
commit1c697ff1c5520353bec35003bfb8ac426516800a (patch)
tree941ea58d741fcb1146c6140aaa89bfc18c377e29 /src
parent01955eec71341987f73a43a3dcd4ead7a7ff9574 (diff)
downloadstrongswan-1c697ff1c5520353bec35003bfb8ac426516800a.tar.bz2
strongswan-1c697ff1c5520353bec35003bfb8ac426516800a.tar.xz
kernel-pfroute: Try to ensure we get a source address or interface name
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 21bbf1ac2..b38a906bd 100644
--- a/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
+++ b/src/libhydra/plugins/kernel_pfroute/kernel_pfroute_net.c
@@ -1120,6 +1120,12 @@ static host_t *get_route(private_kernel_pfroute_net_t *this, bool nexthop,
case RTAX_IFA:
add_rt_addr(&msg.hdr, RTA_IFA, src);
break;
+ case RTAX_IFP:
+ if (!nexthop)
+ { /* add an empty IFP to ensure we get a source address */
+ add_rt_ifname(&msg.hdr, RTA_IFP, "");
+ }
+ break;
default:
break;
}