kernel-interface: Add destination prefix to get_nexthop()
This allows to determine the next hop to reach a subnet, for instance, when installing routes for shunt policies.
This commit is contained in:
@@ -2112,7 +2112,7 @@ static void add_exclude_route(private_kernel_pfkey_ipsec_t *this,
|
||||
{
|
||||
DBG2(DBG_KNL, "installing new exclude route for %H src %H", dst, src);
|
||||
gtw = hydra->kernel_interface->get_nexthop(hydra->kernel_interface,
|
||||
dst, NULL);
|
||||
dst, -1, NULL);
|
||||
if (gtw)
|
||||
{
|
||||
char *if_name = NULL;
|
||||
@@ -2224,7 +2224,7 @@ static bool install_route(private_kernel_pfkey_ipsec_t *this,
|
||||
.prefixlen = policy->src.mask,
|
||||
.src_ip = host,
|
||||
.gateway = hydra->kernel_interface->get_nexthop(
|
||||
hydra->kernel_interface, dst, src),
|
||||
hydra->kernel_interface, dst, -1, src),
|
||||
.dst_net = chunk_clone(policy->src.net->get_address(policy->src.net)),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user