aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/libhydra/kernel')
-rw-r--r--src/libhydra/kernel/kernel_interface.c4
-rw-r--r--src/libhydra/kernel/kernel_interface.h6
-rw-r--r--src/libhydra/kernel/kernel_net.h7
3 files changed, 11 insertions, 6 deletions
diff --git a/src/libhydra/kernel/kernel_interface.c b/src/libhydra/kernel/kernel_interface.c
index 0ee5e1a55..90ed73716 100644
--- a/src/libhydra/kernel/kernel_interface.c
+++ b/src/libhydra/kernel/kernel_interface.c
@@ -269,13 +269,13 @@ 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)
+ private_kernel_interface_t *this, host_t *dest, host_t *src)
{
if (!this->net)
{
return NULL;
}
- return this->net->get_nexthop(this->net, dest);
+ return this->net->get_nexthop(this->net, dest, src);
}
METHOD(kernel_interface_t, get_interface, char*,
diff --git a/src/libhydra/kernel/kernel_interface.h b/src/libhydra/kernel/kernel_interface.h
index a17e8c6bb..338cf39af 100644
--- a/src/libhydra/kernel/kernel_interface.h
+++ b/src/libhydra/kernel/kernel_interface.h
@@ -282,7 +282,7 @@ struct kernel_interface_t {
* Does a route lookup to get the source address used to reach dest.
* The returned host is allocated and must be destroyed.
* An optional src address can be used to check if a route is available
- * for given source to dest.
+ * for the given source to dest.
*
* @param dest target destination address
* @param src source address to check, or NULL
@@ -296,11 +296,13 @@ struct kernel_interface_t {
*
* Does a route lookup to get the next hop used to reach dest.
* The returned host is allocated and must be destroyed.
+ * An optional src address can be used to check if a route is available
+ * for the given source to dest.
*
* @param dest target destination address
* @return next hop address, NULL if unreachable
*/
- host_t* (*get_nexthop)(kernel_interface_t *this, host_t *dest);
+ host_t* (*get_nexthop)(kernel_interface_t *this, host_t *dest, host_t *src);
/**
* Get the interface name of a local address.
diff --git a/src/libhydra/kernel/kernel_net.h b/src/libhydra/kernel/kernel_net.h
index a89e76804..a9b6fba50 100644
--- a/src/libhydra/kernel/kernel_net.h
+++ b/src/libhydra/kernel/kernel_net.h
@@ -42,7 +42,7 @@ struct kernel_net_t {
* Does a route lookup to get the source address used to reach dest.
* The returned host is allocated and must be destroyed.
* An optional src address can be used to check if a route is available
- * for given source to dest.
+ * for the given source to dest.
*
* @param dest target destination address
* @param src source address to check, or NULL
@@ -55,11 +55,14 @@ struct kernel_net_t {
*
* Does a route lookup to get the next hop used to reach dest.
* The returned host is allocated and must be destroyed.
+ * An optional src address can be used to check if a route is available
+ * for the given source to dest.
*
* @param dest target destination address
+ * @param src source address to check, or NULL
* @return next hop address, NULL if unreachable
*/
- host_t* (*get_nexthop)(kernel_net_t *this, host_t *dest);
+ host_t* (*get_nexthop)(kernel_net_t *this, host_t *dest, host_t *src);
/**
* Get the interface name of a local address.