kernel-netlink: Don't require an interface name for passthrough policies

This commit is contained in:
Tobias Brunner
2020-03-10 10:26:42 +01:00
parent b0b6bd2470
commit e23708bdf3
2 changed files with 4 additions and 3 deletions
@@ -2661,8 +2661,9 @@ static void install_route(private_kernel_netlink_ipsec_t *this,
iface = route->src_ip;
}
if (!charon->kernel->get_interface(charon->kernel, iface,
&route->if_name))
{
&route->if_name) &&
!route->pass)
{ /* don't require an interface for passthrough policies */
route_entry_destroy(route);
return;
}
@@ -585,7 +585,7 @@ static job_requeue_t reinstall_routes(private_kernel_netlink_net_t *this)
net_change_t *change, lookup = {
.if_name = route->if_name,
};
if (route->pass)
if (route->pass || !route->if_name)
{ /* no need to reinstall these, they don't reference interfaces */
continue;
}