aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}