kernel-net: Let get_nexthop() return an optional interface name
The returned name should be the interface over which the destination address/net is reachable.
This commit is contained in:
@@ -524,13 +524,14 @@ METHOD(kernel_interface_t, get_source_addr, host_t*,
|
||||
}
|
||||
|
||||
METHOD(kernel_interface_t, get_nexthop, host_t*,
|
||||
private_kernel_interface_t *this, host_t *dest, int prefix, host_t *src)
|
||||
private_kernel_interface_t *this, host_t *dest, int prefix, host_t *src,
|
||||
char **iface)
|
||||
{
|
||||
if (!this->net)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
return this->net->get_nexthop(this->net, dest, prefix, src);
|
||||
return this->net->get_nexthop(this->net, dest, prefix, src, iface);
|
||||
}
|
||||
|
||||
METHOD(kernel_interface_t, get_interface, bool,
|
||||
|
||||
Reference in New Issue
Block a user